Created
April 26, 2013 19:19
-
-
Save rmyers/5469686 to your computer and use it in GitHub Desktop.
blah
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
def gen(): | |
print 'foo' | |
class Test(object): | |
@classmethod | |
def _uuid(cls): | |
return gen() | |
@classmethod | |
def foo(cls): | |
if cls._uuid is not None: | |
print cls._uuid() | |
class B(Test): | |
_uuid = None | |
t=Test() | |
b=B() | |
t.foo() | |
b.foo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment