[Bruno Desthuilliers]
> C Gillespie a écrit :
> > Does anyone know of any examples on how (& where) to use
> > staticmethods and classmethods?
> Here's an example from a ldap lib [...]
I recently had a use case for class methods while converting a PL/I
program to Python: a lot of global declarat
C Gillespie a écrit :
> Hi,
>
> Does anyone know of any examples on how (& where) to use staticmethods and
> classmethods?
>
Here's an example from a ldap lib (work in progress, not finished, and
all other disclaimers).
The class methods are here:
# ---
"C Gillespie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Does anyone know of any examples on how (& where) to use staticmethods and
> classmethods?
A python class method is closer to a Java static method than a python static
method.
Class methods can be useful if you w
C Gillespie wrote:
> Does anyone know of any examples on how (& where) to use staticmethods and
> classmethods?
My personal experience is that I almost *never* want a staticmethod.
The things that I would have written as a staticmethod in Java I simply
write as a module-level function in Python.
Think I read something about it here:
http://heather.cs.ucdavis.edu/~matloff/Python/
not sure though.
Lorenzo
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Does anyone know of any examples on how (& where) to use staticmethods and
classmethods?
Thanks
Colin
--
http://mail.python.org/mailman/listinfo/python-list