Movatterモバイル変換
[0]ホーム
[Python-Dev] Keyword module cruft question
Patrick K. O'Brienpobrien@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=20attributes are harmful to the extent that one has to know to ignore them.==20Knowing what to ignore is difficult when learning Python or working with =an=20unfamiliar module. And extraneous attributes are cumbersome when making u=se=20of Python's introspection features, such as dir(object), or when using a=20Python shell or editor that offers autocompletion. And, finally, they get= in=20the way while writing an article about Python introspection. ;-)Also, little things like this make it more challenging to present Python =in=20its most positive light for a general audience, featuring characteristics= of=20the language that are supposed to show how it is a better choice than oth=er=20languages. I'm not saying that having a few extraneous attributes is a hu=ge=20flaw. And you know how much of a fan of Python I am. But anything that ha=s to=20be "brushed under the rug" can create doubt among those who aren't alread=y=20part of the Python community. And I don't think a higher standard would h=urt=20the standard library.Just something to think about.--=20Patrick K. O'BrienOrbtechhttp://www.orbtech.com/web/pobrien-----------------------------------------------"Your source for Python programming expertise."-----------------------------------------------
[8]ページ先頭