Message199920
| Author |
ethan.furman |
| Recipients |
barry, eli.bendersky, ethan.furman, mjpieters, ncoghlan, pitrou, python-dev, r.david.murray |
| Date |
2013年10月14日.16:10:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1381767010.75.0.536215134631.issue19030@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Updated and renamed the DynamicClassAttribute tests, and discovered that classify_class_attrs is not handling instance portion correctly.
class Meta(type):
def __getattr__(self, name):
if name == 'ham':
return 'spam'
return super().__getattr__(name)
class VA(metaclass=Meta):
@types.DynamicClassAttribute
def ham(self):
return 'eggs'
We should see both eggs and spam, but only eggs is showing up. |
|