Author Wheerd
Recipients Wheerd, gvanrossum, levkivskyi
Date 2017-01-26.13:34:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485437664.21.0.532251633923.issue29377@psf.upfronthosting.co.za>
In-reply-to
Content
I would suggest the names SlotWrapperType and MethodWrapperType because I think they match their string representations the closest.

For checking whether something is a method/function one could also use inspect.isroutine (or inspect.ismethoddescriptor), but that is inconsistent with regards to builtin and python methods:

>>> import inspect
>>> inspect.isroutine(object.__init__)
True
>>> inspect.isroutine(object().__init__)
False
>>> class A:
...   def f(self):
...     pass
...
>>> inspect.isroutine(A.f)
True
>>> inspect.isroutine(A().f)
True

Maybe a function to detect the second case is needed.
History
Date User Action Args
2017-01-26 13:34:24Wheerdsetrecipients: + Wheerd, gvanrossum, levkivskyi
2017-01-26 13:34:24Wheerdsetmessageid: <1485437664.21.0.532251633923.issue29377@psf.upfronthosting.co.za>
2017-01-26 13:34:24Wheerdlinkissue29377 messages
2017-01-26 13:34:23Wheerdcreate