[Python-3000] Special methods and interface-based type system

Jim Jewett jimjjewett at gmail.com
Sun Nov 26 18:25:17 CET 2006


On 11/25/06, Phillip J. Eby <pje at telecommunity.com> wrote:

> However, in the normal use cases for generic functions,
> you don't often put the methods directly in the classes!

I think this gets to the core of my biggest worry.

When I'm doing sysadmin-type maintenance (which at my employer does
not mean python, but rather nested *sh scripts, some sourced and some
called), my biggest problem is figuring out where things *really* came
from.

Ahh ... it comes from this variable, which was set ... where?  And
reset where?  Oh, at that point the path was this, so it was really
using *that* version.

I have resisted using twisted because (at least at first glance) it
seems to factor classes so small that I end up with the same feeling
of magic -- I couldn't easily find where things were defined, or get
the full API and documents in one place.

I fear that generic functions would encourage this sort of action at a
distance.  I would probably use it myself, because I know it can be
very helpful when I'm initially writing something.  But it can also
make life terribly hard for the next person.  One reason I like python
is that it doesn't usually encourage that sort of tradeoff.

-jJ


More information about the Python-3000 mailing list