[Python-Dev] Can Python implementations reject semantically invalid expressions? (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jul 3 03:43:04 CEST 2010
- Previous message: [Python-Dev] Can Python implementations reject semantically invalid expressions?
- Next message: [Python-Dev] Can Python implementations reject semantically invalid expressions?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Can Python implementations reject semantically invalid expressions?
- Next message: [Python-Dev] Can Python implementations reject semantically invalid expressions?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]