[Python-Dev] Python 2.2a* getattr suggestion and question
Roman Suzi
rnd@onego.ru
Sun, 30 Sep 2001 17:56:40 +0400 (MSD)
On Sun, 30 Sep 2001, Guido van Rossum wrote:
>> Well, now every attr access goes thru __getattr__-method,
>> so this could cause situations which give not so clear
>> diagnostics:
>
>Please update to 2.2a4. Every new-style instance attribute access
>goes throuh __getattribute__; __getattr__ does the same as for classic
>classes.
That is good to hear! I forgot to upgrade to latest version before
posting complains, sorry.
>It's true that if you screw with __getattribute__, you'll still break
>your objects; but that's hard to avoid given how things work.
Sure. Still, I think interpreter diagnostics should be pointing to the
exact place of trouble. At least, __getattribute__ must appear somewhere
in the traceback to give a hint where from __repr__ was attempted to be
called.
Sincerely yours, Roman Suzi
--
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd@onego.ru _/
_/ Sunday, September 30, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "Killer Rabbit's Motto: "Lettuce Prey."" _/