Augmented Assignement (was: Re: PEP scepticism)

Skip Montanaro skip at pobox.com
Mon Jul 2 14:16:59 EDT 2001


    Paul> "Advanced" types could have "smart" behaviour and simple types
    Paul> could have x=x+y behaviour.

Let's ignore lists, tuples and numbers for a moment because most people know
how they are supposed to work (or will figure it out with a simple script).
Suppose I see code like this

    import mumble
    x = mumble.Mumble()
    ...
    x += 1

How am I supposed to know without digging around in the code or docs for the
mumble module if it is a "simple" or "advanced" type?  You haven't solved
any problems, just added a new protocol for programmers to implement that
will be done so in a haphazard fashion.

Skip




More information about the Python-list mailing list