Phillip J. Eby wrote: > I'm not sure where you got the "Python is not a one pass compiler" idea; I > don't recall having seen this meme anywhere before, and I don't see how > it's meaningful anyway.
Indeed, Python's bytecode compiler essentially *is* a one-pass compiler (or at least it used to be -- not sure what's been done to it recently). But the behaviour seen here is more about what happens at run time than compile time. What you're trying to do is essentially the same as print x x = 42 which fails at run time because x hasn't been bound when the print statement is executed. Greg _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com