Am 30.10.2012 18:23, schrieb Jean-Michel Pichavant:
- Original Message -
[snip]
I haven't figured out the justification for staticmethod,
http://en.wikipedia.org/wiki/Namespace
+
"Namespaces are one honking great idea -- let's do more of those!"
Someone may successfully use only modul
On 30/10/2012 12:25, Ulrich Eckhardt wrote:
Hi!
I can call a staticmethod f() of class C like "C.f()" or with an
instance like "C().f()". Inside that staticmethod, I have neither the
class (at least not the original one) nor do I have an instance, so I
can't call a different staticmethod from th
- Original Message -
[snip]
> I haven't figured out the justification for staticmethod,
http://en.wikipedia.org/wiki/Namespace
+
"Namespaces are one honking great idea -- let's do more of those!"
Someone may successfully use only modules as namespaces, but classes can be
used as well.
Am 30.10.2012 14:47, schrieb Dave Angel:
I'd think the obvious solution is to move both the functions outside of
the class. I haven't figured out the justification for staticmethod,
except for java or C++ converts.
Although I come from a C++ background, I think static functions have
solid rea
On Tue, Oct 30, 2012 at 7:41 AM, Ethan Furman wrote:
> class Spam():
> @staticmethod
> def green():
> print('on a train!')
> @staticmethod
> def question():
> print('would you, could you', end='')
> Spam.green()
>
> It can be a pain if you change the class n
On 10/30/2012 08:25 AM, Ulrich Eckhardt wrote:
> Hi!
>
> I can call a staticmethod f() of class C like "C.f()" or with an
> instance like "C().f()". Inside that staticmethod, I have neither the
> class (at least not the original one) nor do I have an instance, so I
> can't call a different staticme
Ulrich Eckhardt wrote:
I can call a staticmethod f() of class C like "C.f()" or with an
instance like "C().f()". Inside that staticmethod, I have neither the
class (at least not the original one) nor do I have an instance, so I
can't call a different staticmethod from the same class. The obviou