[Python-3000] Switch and static, redux
Josiah Carlson
jcarlson at uci.edu
Sat Jul 15 22:14:19 CEST 2006
"Marcin 'Qrczak' Kowalczyk" <qrczak at knm.org.pl> wrote:
>
> Greg Ewing <greg.ewing at canterbury.ac.nz> writes:
>
> > So I'd like to propose that "def time" be modified
> > slightly to mean "def time of the outermost function
> > that is still inside the scopes containing all the
> > names that the case expressions depend on". Not
> > sure about the wording of that, but I hope you get the
> > idea. In the above example, that would be the def time
> > of f(), rather than g().
>
> If it was possible to define constants (as opposed to variables),
> including recognizing imported named constants, then the natural
> semantics of switch (evaluate cases at the time of the switch)
> would be easy to optimize.
You aren't saying anything that hasn't been said in this thread at least
a dozen times. You are at least 3 weeks behind in this conversation.
Start with the python-dev archives and catch up, or read the PEP.
- Josiah
More information about the Python-3000
mailing list