Message286311
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. |
|
Date |
User |
Action |
Args |
2017-01-26 13:34:24 | Wheerd | set | recipients:
+ Wheerd, gvanrossum, levkivskyi |
2017-01-26 13:34:24 | Wheerd | set | messageid: <1485437664.21.0.532251633923.issue29377@psf.upfronthosting.co.za> |
2017-01-26 13:34:24 | Wheerd | link | issue29377 messages |
2017-01-26 13:34:23 | Wheerd | create | |
|