Created
December 21, 2013 15:12
-
-
Save agrif/8070614 to your computer and use it in GitHub Desktop.
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
| class Base: | |
| pass | |
| if __name__ == '__main__': | |
| from mod2 import Derived | |
| print("Derived:", Derived) | |
| print("Derived.__bases__:", Derived.__bases__) | |
| print("Base:", Base) | |
| print("issubclass(Derived, Base):", issubclass(Derived, Base)) |
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
| from mod1 import Base | |
| class Derived(Base): | |
| pass |
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
| agrif@nara ~/devel/other/hesperus-realistic/bug $ python -m mod1 | |
| Derived: <class 'mod2.Derived'> | |
| Derived.__bases__: (<class 'mod1.Base'>,) | |
| Base: <class '__main__.Base'> | |
| issubclass(Derived, Base): False | |
| agrif@nara ~/devel/other/hesperus-realistic/bug $ python --version | |
| Python 3.3.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment