This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients jdemeyer, ncoghlan, rhettinger, terry.reedy
Date 2018-04-14.05:04:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1523682294.21.0.682650639539.issue33261@psf.upfronthosting.co.za>
In-reply-to
Content
The inspect functions throwing an exception when handed a method wrapping a non-function callable instead of returning False is a definite bug.

The behaviour of MethodType when handed a non-function callable is cryptic, but not actually a bug: the problem is that it expects to be able to delegate accesses to __name__ and __code__ to the underlying callable.

A docs bug to clarify exactly which accesses are going to get delegated would make sense (and perhaps make MethodType.__dir__ a bit smarter about that delegation), but it's a separate issue from the one Jeroen has reported here.
History
Date User Action Args
2018-04-14 05:04:54ncoghlansetrecipients: + ncoghlan, rhettinger, terry.reedy, jdemeyer
2018-04-14 05:04:54ncoghlansetmessageid: <1523682294.21.0.682650639539.issue33261@psf.upfronthosting.co.za>
2018-04-14 05:04:54ncoghlanlinkissue33261 messages
2018-04-14 05:04:53ncoghlancreate