[Python-Dev] Those import related syntax errors again...

Jeremy Hylton jeremy@alum.mit.edu
Tue, 20 Feb 2001 23:28:20 -0500 (EST)


>>>>> "MH" == Mark Hammond <MarkH@ActiveState.com> writes:

  >> This probably won't be a very popular suggestion, but how about
  >> pulling nested scopes (I assume they are at the root of the
  >> problem) until this can be solved cleanly?

  MH> Agreed.  While I think nested scopes are kinda cool, I have
  MH> lived without them, and really without missing them, for years.
  MH> At the moment the cure appears worse then the symptoms in at
  MH> least a few cases.  If nothing else, it compromises the elegant
  MH> simplicity of Python that drew me here in the first place!

Mark,

I'll buy that you're suffering at the moment, but I'm not sure why.
You have a lot of code that uses 'from ... import *' inside
functions.  If so, that's the source of the compatibility problem.
If you had a tool that listed all the code that needed to be fixed
and/or you got tracebacks that highlighted the offending line rather
than some import, would you still be suffering?  It sounds like the
problem wouldn't be much harder then multi-argument append at that
point.

I also disagree strongly with the argument that nested scopes
compromise the elegent simplicity of Python.  Did you really look at
Python and say, "None of those stinking scoping rules.  Let me at it."
<wink>  I think the new rules are different, but no more or less
complex than the old ones.

Jeremy