Toplevel "test()" functions in standard library

David root at 127.0.0.1
Thu Jul 27 15:46:22 EDT 2000


On Thu, 27 Jul 2000 02:01:37 GMT, Guido van Rossum <guido at python.org>
wrote:
>I agree that it's better to name the routine _test(), but for most
>modules, and in most cases, it's bad style anyway to write ``from M
>import *'', so naming it test() is no great sin.

ARRRRRGGGGHHH!
 
What's with this attitude that it's alright to do the wrong thing?
 
It's no great sin to walk on the grass, either, but when enough people do
it, the grass dies and an ugly scar tracks across the civic square.
 
Either a sidewalk should be poured, so that the path becomes legitimate, or
people should quit being lazy and stay on the existing sidewalks.
 
Which is the better solution?  It depends on the situation.  In my town,
there's a pretty obvious need for a bit of sidewalk from the corner of the
block to the library door: people are crossing the street properly, but the
actual sidewalks to the library are the legs of a triangle, not the
hypotenuse.  Of *course* they're going to shortcut.
 
On the other hand, when I'm out backpacking, it infuriates me to see the
mindless destruction of backcountry trails on steep terrain.  Fricking
idiots that shortcut the corners of switchbacks inevitable cause enough
damage *even when they're only one of fifty people to shortcut* a washout
occurs in the next rainstorm.
 
In Python, I think the decisions should be based on making the best
possible decision: the decision that demonstrates and encourages
high-quality coding.  The core language and core modules should do the
*right* thing, at all times.  Make them a superior example of excellent
practices.
 
IMO, etc.




More information about the Python-list mailing list