On 6/20/06, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Phillip J. Eby wrote:
>
> > Actually, one could consider "case" expressions to be computed at function
> > definition time, the way function defaults are.  That would solve the
> > problem of symbolic constants, or indeed any sort of expressions.
>
> That's an excellent idea!

Seconded. (I somehow missed Phillip's post the first time around -- apologies.)

> > It's just a question of which one is easier to explain.
>
> I think the function-definition-time one is easiest to
> both explain and also to reason about when writing code,
> since definition time is well-defined, whereas "the first
> time it's executed" is somewhat fuzzy.
>
> It's also a lot clearer how it interacts with closures,
> which is another good point.
>
> I recommend adding this option to the relevant PEP
> (whichever it is).

I think we should consider adding to PEP 275 rather than starting
over; it's still mostly relevant.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
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