"Marcin 'Qrczak' Kowalczyk" <[EMAIL PROTECTED]> wrote:
> 
> Josiah Carlson <[EMAIL PROTECTED]> writes:
> 
> > After reading Thomas' post and Talin's response, I'm going to have to
> > agree with Talin; syntax options are moot until we can decide what is
> > acceptable in the case EXPR.
> 
> IMHO any expression should be acceptable, it should be evaluated when
> being compared, and there should be other means (independent from
> switch/case) to make named constants which may be expanded at compile
> time.

The problem with allowing *any* expression is that then switch/case
statements are, strictly speaking, a new syntax for a simplified
if/elif/else chain; offering precisely no advantages over what currently
exists. One important point of the entire Switch/Case statement
discussion was that if we couldn't make it fast with dictionary dispatch,
then it doesn't really have a use.  Deciding on what can be made into
compile time constants, will allow for dictionary dispatch, and gives
the PEP a point.


 - Josiah

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

Reply via email to