On Fri, Jul 2, 2010 at 4:55 PM, Craig Citro <craigci...@gmail.com> wrote: > Honestly, though, I'd come down on the side of letting the compiler > raise an error -- while I understand that it means you have > *different* behavior, I think it's *preferable* behavior.
But you would be taking a module that will compile and making it uncompilable. The Python code: def f(): return 1 + "1" has fully defined runtime semantics: when f() is called, it will raise TypeError. A module containing this code is still perfectly valid Python (e.g. the Python test suite does that kind of thing a lot in tests of the core interpreter semantics). A Python implementation issuing a SyntaxWarning over this would be fine, but triggering a SyntaxError would not be valid. However, I'd be inclined to leave this kind of check to tools like pychecker and pylint. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ 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