Why I need to declare import as global in function

Peter Otten __peter__ at web.de
Tue Nov 29 09:54:25 EST 2005


Duncan Booth wrote:

> Isn't it fun trying to guess the problem in the absence of the code?

What other reason could there be to forego the sane approach -- stick
'import math' everywhere it might belong? 
Those exec/execfile() peculiarities are so much more interesting ;-)

Peter




More information about the Python-list mailing list