PEP 285: Adding a bool type

Alex Martelli aleax at aleax.it
Mon Apr 8 12:09:42 EDT 2002


Bengt Richter wrote:
    ... 
>>>>Assignments in expressions will never happen.
    ...
> But why "identical" ;-) If I can find another spelling that works
> everywhere (and it wouldn't surprise me if you had one in mind ;-)
> wouldn't that be interesting?

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66061

for example.  But, like your attempt, it's based on NOT being
an assignment (so Aahz's quote above remains perfectly right).

Not all "stashing a reference to this value off somewhere" are
assignments (some of the many who aren't can correctly appear
within expressions -- others can't).


Alex




More information about the Python-list mailing list