two ideoms at one blow: line-reading and regexp-matching

Paul Rubin phr-n2002a at nightsong.com
Wed Feb 20 18:32:37 EST 2002


Jeff Shannon <jeff at ccvcorp.com> writes:
> > So why are augmented assignments not allowed in expressions?
> >
> >   if (foo += 2) < 7:
> >         handle_foo()
> >
> > doesn't seem likely be an =/== confusion.
> 
> Because the benefits of doing this are small compared to the detriment of
> muddying the statement/expression distinction, perhaps?  It would be a weird
> special case, behaving differently from everything else in the language, and
> therefore a wart.

Aha, so it has nothing to do with =/== confusion.  That's what I wanted
to know.  

Next question: why is muddying the statement/expression distinction a
detriment?  As opposed to the alternate view, that the statement/expression
distinction is itself a detriment?



More information about the Python-list mailing list