Florian Mayer <[email protected]> added the comment:
Apparently another way to get getattr_static to execute code in Python 2.3rc3
is simply the following.
>>> class Foo:
... @property
... def __dict__(self):
... print("Hello, World.")
... return {}
...
>>> import inspect
>>> inspect.getattr_static(Foo(), 'a')
Hello, World.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/name/opt/lib/python3.2/inspect.py", line 1130, in getattr_static
raise AttributeError(attr)
AttributeError: a
>>>
----------
nosy: +segfaulthunter
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11133>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com