Created
May 30, 2020 08:51
-
-
Save eclecticmiraclecat/4a98fa66ad6ea1d3c90cffd1a16902aa 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 Foo: | |
... def __get__(self, instance, owner_class): | |
... print('hello from foo') | |
... | |
>>> class Bar: | |
... foo = Foo() | |
... | |
>>> b = Bar() | |
>>> b.foo | |
hello from foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment