Message137658
| Author |
soren |
| Recipients |
Arfrever, Trundle, barry, benjamin.peterson, eric.araujo, jcea, michael.foord, ncoghlan, r.david.murray, rhettinger, soren |
| Date |
2011年06月04日.18:42:43 |
| SpamBayes Score |
4.579078e-06 |
| Marked as misclassified |
No |
| Message-id |
<1307212964.67.0.685232672857.issue12248@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
When I first investigated this problem (I reported the original bug on Launchpad), my first attempt to address this issue in pymox had me quite stumped. The class in question has a __getattr__ method. Up until now, this hasn't affected the use of dir(), but it does now. I really just wanted it return whatever it used to return (since that has worked so far), but realising that this was an old-style class, I couldn't just call super(TheClass, self).__dir__().
So my question is: If this change stays (which seems clear given that the only changes proposed here are ways of relaxing the type requirement of the __dir__ method's return value, not reverting the change altogether), and I have an old-style class with a __getattr__ defined, how do I make that class return whatever it would have usually returned for __dir__()? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年06月04日 18:42:44 | soren | set | recipients:
+ soren, barry, rhettinger, jcea, ncoghlan, benjamin.peterson, eric.araujo, Arfrever, r.david.murray, michael.foord, Trundle |
| 2011年06月04日 18:42:44 | soren | set | messageid: <1307212964.67.0.685232672857.issue12248@psf.upfronthosting.co.za> |
| 2011年06月04日 18:42:44 | soren | link | issue12248 messages |
| 2011年06月04日 18:42:43 | soren | create |
|