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/2006-June/066376.html below:

[Python-Dev] Switch statement

[Python-Dev] Switch statement [Python-Dev] Switch statementGuido van Rossum guido at python.org
Thu Jun 22 18:37:41 CEST 2006
On 6/22/06, Phillip J. Eby <pje at telecommunity.com> wrote:
> This hypothetical "const" would be a *statement*,
> executed like any other statement.  It binds a name to a value -- and
> produces an error if the value changes.  The compiler doesn't need to know
> what it evaluates to at runtime; that's what LOAD_NAME or LOAD_DEREF are
> for.  ;)

Please think this through more. How do you implement the "produces an
error if the value changes" part? Is the const property you're
thinking of part of the name or of the object it refers to?

The only way I can see it work is if const-ness is a compile-time
property of names, just like global. But that requires too much
repetition when a constant is imported.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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