Skip to content

Instantly share code, notes, and snippets.

@jimbaker
Created March 21, 2014 15:01
Show Gist options
  • Save jimbaker/9688160 to your computer and use it in GitHub Desktop.
Save jimbaker/9688160 to your computer and use it in GitHub Desktop.
Conditional Jython class definition
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