[Python-Dev] Improving nested-scope warnings?

Guido van Rossum guido@digicool.com
Thu, 12 Jul 2001 08:32:47 -0400

Someone on SF made a point: the warnings you get about nested scopes
aren't always as helpful as they could be.

> My "user experience" of porting my 2.0 code to 2.1 is
> however fairly pityful. Here some destilled suggestions:
> * separate warnings for "potential" "import *" problems for
> standard
>    modules (as in the examples) -- sure we know what math
> exports
>    right now and "from math import *" is a common idiom.
> * run-time warnings for shadowed constructs
> * listing of the variables that are imported and one may
> want to
>    import by name instead (or qualify)
> While I really like the new scoping rules and they support
> my programming style their practical impact on existing code
> is quite
> large. A better support would be fairly important -- I have
> 50.000 lines of code to port ....

(From http://sourceforge.net/tracker/?func=detail&atid=105470&aid=440497&group_id=5470)

Anybody interested in implementing some of these?  I guess this would
be in the 2.1.1 branch, as in the 2.2 branch we're about to enable the

--Guido van Rossum (home page: http://www.python.org/~guido/)