two ideoms at one blow: line-reading and regexp-matching
Paul Rubin
phr-n2002a at nightsong.com
Wed Feb 20 11:22:34 EST 2002
"Sean 'Shaleh' Perry" <shalehperry at attbi.com> writes:
> this is a design decision in the language. By not allowing this style of
> programming we do not have the ever so fun:
>
> if foo = 2:
> handle_foo()
>
> type bugs. Sure there are ways around it.
So why are augmented assignments not allowed in expressions?
if (foo += 2) < 7:
handle_foo()
doesn't seem likely be an =/== confusion.
More information about the Python-list
mailing list