A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-June/066536.html below:

[Python-Dev] Switch statement

[Python-Dev] Switch statement [Python-Dev] Switch statementGuido van Rossum guido at python.org
Mon Jun 26 01:09:46 CEST 2006
On 6/25/06, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Guido van Rossum wrote:
> > I'm currently leaning
> > towards making static expressions outside a function illegal and limit
> > switches outside a function to compile-time-constant expressions.
>
> I'm not sure I like the idea of having things that
> are illegal outside a function, because it can be a
> nuisance for code refactoring.
>
> I'd be happy if case worked at the top level, but
> wasn't any faster than if-elses. That wouldn't be
> so bad -- top-level code is already slower due to
> global variable accesses.
>
> Also I don't care what happens if you change the
> case values of a top-level case. It's undefined
> behaviour anyway.

Fair enough. I wasn't leaning very strongly anyway. :-)

-- 
--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