Message58581
it seems the code of PyObject_GenericGetAttr, which invokes the
descriptor protocol, silences any AttributeErrors raised by the
descriptor, for classes that also define __getattr__. it should
propagate up rather than being silently ignored.
the attached example is quite artificial, but it's a simplification of
real world code i had hard time debugging. turned out i misspelled an
attribute name inside the property getter function, which raised an
AttributeError as expected -- but the exception i got was quite
misleading, saying the instance has no attribute named so.
this bug only happens when the class defines a custom __getattr__. see
attached demo file for details. |
| File name |
Uploaded |
|
demo.txt
|
gangesmaster,
2007-12-13.20:13:36
|
|
| Date |
User |
Action |
Args |
| 2007-12-13 20:13:37 | gangesmaster | set | spambayes_score: 0.0206308 -> 0.0206308 recipients:
+ gangesmaster |
| 2007-12-13 20:13:37 | gangesmaster | set | spambayes_score: 0.0206308 -> 0.0206308 messageid: <1197576817.5.0.617961278098.issue1615@psf.upfronthosting.co.za> |
| 2007-12-13 20:13:37 | gangesmaster | link | issue1615 messages |
| 2007-12-13 20:13:36 | gangesmaster | create | |
|