Created
March 21, 2014 15:01
-
-
Save jimbaker/9688160 to your computer and use it in GitHub Desktop.
Conditional Jython class definition
This file contains hidden or 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
try: | |
from better.baz.package import ImprovedBar | |
class Foo(ImprovedBar): | |
... | |
except ImportError: | |
from ok.baz.package import ImprovedBar | |
class Foo(Bar): | |
... | |
# class Foo is now available, but Clamp in general cannot make both available | |
# (although we could always special case) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment