Comparison function as class method: how?

Thomas Heller theller at python.net
Fri May 9 05:30:00 EDT 2003


Alex Martelli <aleax at aleax.it> writes:

> <posted & mailed>
> 
> Jeff Stewart wrote:
> 
> > That helps a lot.  But what is the D-S-U idiom?
> 
> Using Google's advanced group search for D-S-U in comp.lang.python
> gives 46 hits and the first few ones should entirely clarify that.
> 
> 
> > And how is someone supposed to know about staticmethod()?  I couldn't find
> > it anywhere in the Tutorial, Language Reference Index, or Library
> > Reference
> > Index.  Is there a better place to go for documentation?
> 
> Similarly googling for staticmethod on c.l.py gives 238 hits, and
> may turn out to be a bit too much for a simple introduction.
> 
> I think it's documented in the "What's new in Python 2.2" document,
> and in the built-in functions page of the Library Reference *for
> Python 2.3*, but it might have been missing from the 2.2 one.
> 
> Not to tout my own horn, but, I do think it's reasonably clearly
> documented (not that it needs much documentation!) in the Nutshell...;-)

To tout *my horn*, pyhelp.cgi does also find it (in the devel docs):

http://starship.python.net/crew/theller/pyhelp.cgi?keyword=staticmethod&version=devel

Thomas




More information about the Python-list mailing list