Message290527
| Author |
serhiy.storchaka |
| Recipients |
benjamin.peterson, eric.araujo, r.david.murray, serhiy.storchaka, torsten, yselivanov |
| Date |
2017年03月26日.13:36:01 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1490535362.01.0.186655133036.issue8488@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Since the descriptor is classified as a routine (inspect.isroutine() returns True because inspect.ismethoddescriptor() returns True), pydoc outputs it in the "Methods defined here" section and uses the docroutine(). But docroutine() requires the __name__ attribute for determining whether this is an original method or an alias. That descriptor doesn't have the __name__ attribute. Actually it is even not callable, so it is questionable whether it can be classified as a method.
I don't know on what level this should be fixed. docroutine()? classify_class_attrs()? isroutine()? ismethoddescriptor()? |
|