py2.1->py2.3.3 __getattr__ confusion

Holger Joukl Holger.Joukl at LBBW.de
Mon Jul 5 03:44:16 EDT 2004


Peter wrote:
>That is, starting with Python 2.3 the repr() and str() functions no longer
>mask exceptions other than AttributeError. Solution: make sure you raise
an
>AttributeError instead of the current KeyError for nonexistent attributes.

Thank you! Hmm, did I overlook that in the what´s new/release notes?

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