(slightly OT): Python and linux - very cool

James J. Besemer jb at cascade-sys.com
Fri Aug 2 05:33:25 CEST 2002


Peter Hansen wrote:

> A better solution would have been
> to make it available via a function, e.g. getThatGlobal(),
> but simply using _ was not suitable in this case.
>
> (It would indirectly have solved the problem, of course, because
> the programmer would have been forced to figure out another
> way to get access to it, but if she knew to use _ in the first
> place, she would also have known about the problems "import *"
> can cause.)

Obviously, ignorance on the part of the module designer is as
bad as or worse than ignornace on the part of the newbie.

> And the old "never use global variables" comes to mind again too...

"Designed from the start to be immune from import
problems" was intended to include other design
considerations, not simply hiding names, though the
latter admittedly was the focus of my overall post.

Sounds like we're not really disagreeing on that broader point.

Regards

--jb

--
James J. Besemer  503-280-0838 voice
http://cascade-sys.com  503-280-0375 fax
mailto:jb at cascade-sys.com






More information about the Python-list mailing list