Skip to content

Instantly share code, notes, and snippets.

@soasme
Created August 16, 2013 07:17
Show Gist options
  • Save soasme/6247926 to your computer and use it in GitHub Desktop.
Save soasme/6247926 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
class Resource(object):
pass
class API(object):
pass
class V1(API):
version = 1
class V2(API):
version = 2
versions = {}
def mount(clz):
versions[clz.version] = clz
class ArkAPI(API):
mount(V1)
mount(V2)
ArkAPI()
print versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment