Maintainability (was Re: Stackless & String-processing)
Amit Patel
amitp at Xenon.Stanford.EDU
Thu Jul 22 17:37:05 EDT 1999
Skip Montanaro <skip at mojam.com> wrote:
|
| What Tim said about programmers not inventing control structures is somewhat
| different than what Aahz put his foot down about. There's nothing wrong
| with "from foo import *" when it's used in the right context. Some modules
| in the standard distribution were designed specifically to support this
| (types and Tkinter come to mind). Used willy-nilly, you can get into
| trouble with it, one-man show or not.
|
Here's a gotcha with import *:
import re
from string import * # Great whenever you're doing string processing
re.compile('abc')
:-(
I think the system modules should define all internal variables with a
'_' prefix! :-)
- Amit
More information about the Python-list
mailing list