Need help with Python scoping rules

Mel mwilson at
Wed Aug 26 16:38:50 CEST 2009

kj wrote:

> Is there any good reason (from the point of view of Python's overall
> design) for not fixing this?

Python is not a compiled language, in the sense that a compiler can go back 
and forth over the program, filling in the details that make the program 
runnable.  Python is an interpreted language in a sense that makes a `class` 
statement an executable statement, with a start time and an end time.  
Before the start time, the affected class doesn't exist.  After the start 
time, the class does exist.  In between, while the `class` statement is 
executing, it's best to make no promises so as not to constrain present and 
future implementations.


More information about the Python-list mailing list