[Python-Dev] PEP 3000 and exec (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Oct 11 02:41:05 CEST 2005


Brett Cannon wrote:

But the better answer is we will just find a way. =)

I think the best answer would be just to dump the idea of exec-in-local-namespace altogether. I don't think I've ever seen a use case for it that wasn't better done some other way.

Most often it seems to be used to answer newbie "variable variable" questions, to which the correct answer is invariably "start thinking in Python, not bash/perl/tcl/PHP/ whatever."

-- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg.ewing at canterbury.ac.nz +--------------------------------------+



More information about the Python-Dev mailing list