CONSTRUCT - Module Attributes and Execution Environment

Fredrik Lundh fredrik at pythonware.com
Sun Aug 27 07:50:07 EDT 2006


Larry Bates wrote:

> 1) Don't call a class instance exec, it will mask the built-in
> exec statement.

"exec" is a reserved word, and cannot be masked:

 >>> exec = 10
   File "<stdin>", line 1
     exec = 10
          ^
SyntaxError: invalid syntax

</F>




More information about the Python-list mailing list