H
Heiko Henkelmann
Please see the following example. Is there any other way to access
SomeAttribute from the nested class, without having to use the actual
name of the outer class?
class SomeClass:
SomeAttribute = 1
class SomeNestedClass:
SomeOtherAttribute = 2
def SomeNestedClassMethod(cls):
print "%s%s" % (
SomeClass.SomeAttribute
cls.SomeOtherAttribute,
)
SomeNestedClassMethod = classmethod(SomeNestedClassMethod)
Thanx
SomeAttribute from the nested class, without having to use the actual
name of the outer class?
class SomeClass:
SomeAttribute = 1
class SomeNestedClass:
SomeOtherAttribute = 2
def SomeNestedClassMethod(cls):
print "%s%s" % (
SomeClass.SomeAttribute
cls.SomeOtherAttribute,
)
SomeNestedClassMethod = classmethod(SomeNestedClassMethod)
Thanx