Augmented Assignement (was: Re: PEP scepticism)
Steve Horne
sh at ttsoftware.co.uk
Mon Jul 2 13:01:04 EDT 2001
On Fri, 29 Jun 2001 14:02:34 -0700, James Logajan <JamesL at Lugoj.Com>
wrote:
>Guido van Rossum wrote:
>> Sorry, I don't understand why people can seriously argue *against*
>> augmented assignment.
>
>And "!=" is augmented assignment for the "!" operator, which does what
>again?
How exactly do you have an augmented assignment version of a unary
operator? And given that, just where is the confusion supposed to come
from?
I've always liked having a colon on my assignment operator - I think
the single = for assignment was a mistake. If we had := for
assignment, then augmented assignments would be more clearly distinct
from other operators - :+=, :-=, :*= etc etc.
The trouble is - well - yuck. Horrible. := works, but :+= looks too
much like a deformed rabit smily with a broken nose ;-)
Of course, I wouldn't mind a !! operator to toggle flags with ;-)
>a cat. By the way, just how did so many mathematical libraries come to be
>written in Fortran, which didn't have augmented assignments? (Just doing my
>baffling part.)
How did so many databases come to be written using COBOL when SQL is
so much better? - because COBOL existed first. This is a drag factor
to progress, but it doesn't mean progress is bad.
BTW - I think the latest FORTRAN standard has augmented assignments,
though I could be wrong. Anyone know for sure?
--
Steve Horne
Home : steve at lurking.demon.co.uk
Work : sh at ttsoftware.co.uk
More information about the Python-list
mailing list