M.-A. Lemburg wrote:

> My personal favorite is making the compiler
> smarter to detect the mentioned if-elif-else scheme
> and generate code which uses a lookup table for
> implementing fast branching.

But then the values need to be actual compile-time
constants, precluding the use of symbolic names,
values precomputed a run time, etc.

A new statement would allow us to simply document
that the case values are *assumed* constant, and
then the implementation could cache them in a dict
or whatever.

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