Message58581
| Author |
gangesmaster |
| Recipients |
gangesmaster |
| Date |
2007年12月13日.20:13:36 |
| SpamBayes Score |
0.020630766 |
| Marked as misclassified |
No |
| Message-id |
<1197576817.5.0.617961278098.issue1615@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
| Files |
| File name |
Uploaded |
|
demo.txt
|
gangesmaster,
2007年12月13日.20:13:36
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年12月13日 20:13:37 | gangesmaster | set | spambayes_score: 0.0206308 -> 0.020630766 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 |
|