why no ++?

Alex Martelli aleaxit at yahoo.com
Tue Aug 14 23:03:28 CEST 2001


"Marcin 'Qrczak' Kowalczyk" <qrczak at knm.org.pl> wrote in message
news:slrn.pl.9nj1eh.5k4.qrczak at qrnik.zagroda...
> Tue, 14 Aug 2001 10:20:50 +0200, Alex Martelli <aleax at aleax.it> pisze:
>
> > So now consider:
> >
> >     y.a = b,c,d = x.e = wower()
> >
> > How would you like to rewrite _this_?-)  There is *NO* rewrite
> > that ensures constant semantics except by introducing _another_
> > temporary variable -- *yecch*!-)
>
> y.a, (b,c,d), x.e = [wower()] * 3

Neat!  OK, mysentence += "or nested-tuple-unpacking (dbl yech!-)"


Alex






More information about the Python-list mailing list