PEP 312 (and thus 308) implemented with a black magic trick

sismex01 at hebmex.com sismex01 at hebmex.com
Tue Mar 18 11:13:16 EST 2003


> From: Chermside, Michael [mailto:mchermside at ingdirect.com]
> Sent: Tuesday, March 18, 2003 10:07 AM
> 
> I just wanted to say that I'm really impressed.
> 
> It's pure evil, of course, but nonetheless very beautiful and
> astoundingly simple.
> 
> For some reason I'm more disturbed by the mis-use of operator
> overloading than by the metaclass which modifies code...
> perhaps because I've been burned by the former before (in C++).
> 
> -- Michael Chermside
>

Perhaps, instead of using "~" as a marker for "lazy-evaluation",
"~~" can be used.  It's easy to see, not too "noisy", it's
syntacticly correct, and very improbable to be used like that.

:-)

-gus





More information about the Python-list mailing list