Wow! I didn't expect anywhere near this amount of interest. Thanks to all who responded. One small comment follows:
On Sat, 3 Jul 2010 03:44:05 am Guido van Rossum wrote: > On Fri, Jul 2, 2010 at 10:28 AM, Nick Coghlan <[email protected]> wrote: > > Given the diverse range of uses Python is put to, moving things > > from runtime to compile time can definitely have significant > > unexpected consequences (hence why many of us would be hesitant to > > consider an implementation that made such changes to be an actual > > Python implementation). > > +1 on not changing this. > > For one, this will most likely break a large amount of 3rd party and > stdlib software -- there are tons of statements like this that are > practically unreachable or intentional. > > Second, I don't think it's going to make the kind of difference the > OP is thinking of. As I said in my initial post, this was a hypothetical, not a serious suggestion for a change, so I'm not pushing for it. I'm not even sure I would vote for change -- somebody asked on #python whether implementations were free to reject semantically impossible code at compile-time, my first instinct was to say Yes, and then I thought about it a bit more and thought "maybe not" and decided to ask here. I'm glad I did, because I've learned a lot. *If* such a change was made, I think it would have to be controlled by a command-line switch or environmental variable, like -O, and documented as potentially changing the behaviour of the program. But given how few accidental errors are likely to be caught by this, I doubt it would be of any real benefit. Thanks to all who answered! -- Steven D'Aprano _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
