[Python-3000] Discussions with no PEPs

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Mar 13 23:10:58 CET 2007


Nick Coghlan wrote:

> Generics can live quite happily inside modules and as methods on objects.

I can see a problem with this when applied to
the pydoc problem discussed earlier.

Suppose pydoc were to define some generic functions
for documenting an object. To avoid polluting the
global namespace, the objects representing them are
placed into the pydoc module.

Now I have a type that I want to make documentable,
so I provide implementations of those functions.
But to register those implementations, I have to
import pydoc. So any time anyone uses my type, for
whatever reason, they end up dragging in pydoc
even if they have no intention of using it.

If instead of pydoc it's some third party module,
the situation is even worse, since the module may
not even be installed on the user's system.

So this scheme would seem to create undesirable
dependencies.

--
Greg


More information about the Python-3000 mailing list