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 ne

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: > lallous 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 > >     d

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

2010-09-14 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : lallous 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.m

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

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