Created
August 16, 2013 07:17
-
-
Save soasme/6247926 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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