A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-July/101390.html below:

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

[Python-Dev] Can Python implementations reject semantically invalid expressions? [Python-Dev] Can Python implementations reject semantically invalid expressions?Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jul 3 06:42:42 CEST 2010
Craig Citro wrote:

> However, in this particular case, here's a question: *why* would
> someone write "return 1 + '1'"?

They might not intend to execute the code at all -- e.g.
they may want to pass the compiled code to dis() to find
out what bytecode gets generated. Having it refuse to
compile would be annoying in that case.

-- 
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4