On 27/05/13 10:43, Jim Mooney wrote:
On 26 May 2013 17:38, eryksun <eryk...@gmail.com> wrote:
On Sun, May 26, 2013 at 8:20 PM, Steven D'Aprano <st...@pearwood.info> wrote:
On 27/05/13 07:40, Jim Mooney wrote:
Good to know that compile doesn't check syntax, since I erroneously
thought it did.
compile does check syntax.
Attempting to iterate an integer is a runtime TypeError, not a
compile-time SyntaxError.
Ah, that clears it up.
Like most dynamic languages, Python's compiler checks very few things at
compile time. In general, there is little that Python *can* check, not without
actually running the code, so even when when Python *could* detect an error at
compile time, it usually doesn't bother because the programming effort is too
high for the benefit.
--
Steven
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor