Message1148
Im trying to figure out the bug here. From:
http://docs.python.org/lib/built-in-funcs.html
"hasattr( object, name)
The arguments are an object and a string. The result is True if the string is the name of one of the object's attributes, False if not. (This is implemented by calling getattr(object, name) and seeing whether it raises an exception or not.)"
Running this code:
>>> class x:
... def __getattr__(self, name):
... print name
and invoking
z = x()
hasattr(z, "something")
produces the same effect on Python as well as Jython. Im working with a Jython3005.
leouser
|
|
Date |
User |
Action |
Args |
2008-02-20 17:17:30 | admin | link | issue1501932 messages |
2008-02-20 17:17:30 | admin | create | |
|