Antwort: Re: Some language proposals. ['LBBW': checked]

Holger Joukl Holger.Joukl at LBBW.de
Thu Feb 26 04:36:17 EST 2004


> Consider the following program:
>
>
> class a:
>          pass
>
> def func():
>          pass
>
> lst = [1, 2, 3, "a", "b", "c", object(), lambda x:x ]
>
> for x in lst:
>          a.b = x
>          assert a.b is x, "What???? %s"% x
>          print "Okay", x
>
> Frankly I think it is unpythonic that a second after assignment to a.b
> the thing I get back is different than the thing I put in.

I do wish you'd run your examples through a Python interpreter before
posting them. The little bugs you include, really interfere with
trying to understand what your point is.

Well, there is no bug at all, as far as I can see. Runs in my interpreter.
Cheers
  Holger

Der Inhalt dieser E-Mail ist vertraulich. Falls Sie nicht der angegebene
Empfänger sind oder falls diese E-Mail irrtümlich an Sie adressiert wurde,
verständigen Sie bitte den Absender sofort und löschen Sie die E-Mail
sodann. Das unerlaubte Kopieren sowie die unbefugte Übermittlung sind nicht
gestattet. Die Sicherheit von Übermittlungen per E-Mail kann nicht
garantiert werden. Falls Sie eine Bestätigung wünschen, fordern Sie bitte
den Inhalt der E-Mail als Hardcopy an.

The contents of this  e-mail are confidential. If you are not the named
addressee or if this transmission has been addressed to you in error,
please notify the sender immediately and then delete this e-mail.  Any
unauthorized copying and transmission is forbidden. E-Mail transmission
cannot be guaranteed to be secure. If verification is required, please
request a hard copy version.







More information about the Python-list mailing list