Re: staticmethod and classmethod

2005-05-26 Thread François Pinard
[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

Re: staticmethod and classmethod

2005-05-26 Thread Bruno Desthuilliers
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: # ---

Re: staticmethod and classmethod

2005-05-24 Thread John Roth
"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

Re: staticmethod and classmethod

2005-05-24 Thread Steven Bethard
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.

Re: staticmethod and classmethod

2005-05-24 Thread lbolognini
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

staticmethod and classmethod

2005-05-24 Thread C Gillespie
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