Re: help with calling a static method in a private class

2010-09-15 Thread lallous
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

Re: help with calling a static method in a private class

2010-09-15 Thread Steven D'Aprano
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

help with calling a static method in a private class

2010-09-14 Thread lallous
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')

Re: help with calling a static method in a private class

2010-09-14 Thread Diez B. Roggisch
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)

Re: help with calling a static method in a private class

2010-09-14 Thread Bruno Desthuilliers
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:,