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.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to