class MyClass:
# public var
var1
# protected var
_var2
# private var
__var3
def public(self): pass def __private(self): # mangled to _MyClass__private pass c = MyClass() c.public() # this works c.__private() # this doesn't
References:
http://stackoverflow.com/questions/735975/static-methods-in-python
No comments:
Post a Comment