[Python-Dev] Can Python implementations reject semantically invalid expressions?

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jul 3 03:43:04 CEST 2010


Craig Citro wrote:

> Ok, I'm obviously being silly here, but sure you can:
> 
>>>>dis.dis("raise TypeError()")

If producing different bytecode were considered a reason
against performing an optimisation, then no code optimisations
would be permissible at all!

-- 
Greg


More information about the Python-Dev mailing list