On Sep 14, 4:38 pm, de...@web.de (Diez B. Roggisch) wrote:
lallouslall...@lgwm.org writes:
How can I keep the class private and have the following work:
[code]
class __internal_class(object):
@staticmethod
def meth1(s):
print meth1:, s
@staticmethod
def
On Tue, 14 Sep 2010 16:38:50 +0200, Diez B. Roggisch wrote:
And additionally, but simply not using staticmethods at all. It's a
rather obscure feature of python - usually, classmethods are what is
considered a static method in other languages.
Are you sure about that? I know Java isn't
How can I keep the class private and have the following work:
[code]
class __internal_class(object):
@staticmethod
def meth1(s):
print meth1:, s
@staticmethod
def meth2(s):
print meth2:,
__internal_class.meth1(s)
x = __internal_class()
x.meth2('sdf')
lallous lall...@lgwm.org writes:
How can I keep the class private and have the following work:
[code]
class __internal_class(object):
@staticmethod
def meth1(s):
print meth1:, s
@staticmethod
def meth2(s):
print meth2:,
__internal_class.meth1(s)
Diez B. Roggisch a écrit :
lallous lall...@lgwm.org writes:
How can I keep the class private and have the following work:
[code]
class __internal_class(object):
@staticmethod
def meth1(s):
print meth1:, s
@staticmethod
def meth2(s):
print meth2:,