[Python-Dev] Keyword module cruft question

Patrick K. O'Brien pobrien@orbtech.com
Tue, 29 Oct 2002 17:52:20 -0600


On Tuesday 29 October 2002 04:41 pm, Guido van Rossum wrote:
> Lots of modules have attributes that are cruft according to this
> definition.  I personally see no reason to get rid of all these --
> they're harmless and "from M import *" doesn't import them.  Feel free
> to hold your own code to a higher standard though. ;-)

I understand what you are saying, and respectfully disagree. Extraneous=20
attributes are harmful to the extent that one has to know to ignore them.=
=20
Knowing what to ignore is difficult when learning Python or working with =
an=20
unfamiliar module. And extraneous attributes are cumbersome when making u=
se=20
of Python's introspection features, such as dir(object), or when using a=20
Python shell or editor that offers autocompletion. And, finally, they get=
 in=20
the way while writing an article about Python introspection. ;-)

Also, little things like this make it more challenging to present Python =
in=20
its most positive light for a general audience, featuring characteristics=
 of=20
the language that are supposed to show how it is a better choice than oth=
er=20
languages. I'm not saying that having a few extraneous attributes is a hu=
ge=20
flaw. And you know how much of a fan of Python I am. But anything that ha=
s to=20
be "brushed under the rug" can create doubt among those who aren't alread=
y=20
part of the Python community. And I don't think a higher standard would h=
urt=20
the standard library.

Just something to think about.

--=20
Patrick K. O'Brien
Orbtech      http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------