Class Methods Vs Any Other Callable
bruno.desthuilliers at gmail.com
bruno.desthuilliers at gmail.com
Wed May 14 17:50:22 EDT 2008
On 14 mai, 22:44, Arnaud Delobelle <arno... at googlemail.com> wrote:
> "bruno.desthuilli... at gmail.com" <bruno.desthuilli... at gmail.com> writes:
> > On 14 mai, 19:45, Arnaud Delobelle <arno... at googlemail.com> wrote:
> >> __new__ is a static method!
>
> > __new__ is a special-cased staticmethod that 1/ must not be declared
> > as such and 2/ takes the class object as first args. As far as I'm
> > concerned, it's semantically a classmethod.
>
> It's a static method!
Sorry Arnaud, I probably didn't made it clear enough : I do know it is
a staticmethod object. What I say is that
1/ it's special-cased since you don't *explicitely* declare it as a
staticmethod
2/ it behaves just like a classmethod, since it takes the class as
first argument.
IOW, I'm talking about semantic, not implementation.
> --
> Arnaud
More information about the Python-list
mailing list