total idiot question: +=, .=, etc...

Greg Ewing greg.ewing at compaq.com
Thu Jul 1 17:14:27 EDT 1999


Bernhard Herzog wrote:
> 
>         .last = .lines[-1]
>         .lines = .lines[:-1]

Hey, I've just had an idea: allow an *empty*
name as an identifier. Then we could write:

  class C:
    def foo(,x,y):
      .z = .z + x * y

and kill two birds with one syntax change!

Greg




More information about the Python-list mailing list