[Doc-SIG] Documenting "Magic" Methods

Moshe Zadka Moshe Zadka <moshez@math.huji.ac.il>
Fri, 18 Aug 2000 07:33:54 +0300 (IDT)


On Tue, 15 Aug 2000, Edward Welbourne wrote:

> >>   I'm not sure it makes sense to document the __*__() methods
> >> individually;
> > Well, certainly __getitem__ makes sense without __setitem__ ...
> 
> *Implementing* magic methods individually is a separate matter from
> *documenting* them individually.  Aside from (off the top of my head)
> __init__ and __call__, the __*__ methods' generic specs (in the language
> reference manual) completely specify how each method is called - the
> interface by which the python engine implements assorted bits of
> syntactic magic.
> 
> Given the generic spec, the __*__ methods are best documented by an
> announcement, in the class doc-string, of which abstract interfaces the
> class implements; the class doc-string is also the right place to
> describe (the abstract form of) any local deviation from normality.

I think you lost me a bit here --
I'm talking about the LaTeX documentation -- this is for something that
needs to be out by 2.0, hopefully.

--
Moshe Zadka <moshez@math.huji.ac.il>
There is no IGLU cabal.
http://advogato.org/person/moshez