diff -r c5f6d122ddd6 Doc/library/types.rst --- a/Doc/library/types.rst Wed Sep 28 00:53:54 2016 +0200 +++ b/Doc/library/types.rst Fri Jan 27 07:53:28 2017 +0100 @@ -124,6 +124,13 @@ C".) +.. data:: SlotWrapperType + MethodWrapperType + + The type of methods of some fundamental built-in data types and base classes (such as :meth:`object.__init__` or `object.__lt__`). + The second one is the type of these methods once they are bound to an instance. + + .. class:: ModuleType(name, doc=None) The type of :term:`modules `. Constructor takes the name of the diff -r c5f6d122ddd6 Lib/test/test_types.py --- a/Lib/test/test_types.py Wed Sep 28 00:53:54 2016 +0200 +++ b/Lib/test/test_types.py Fri Jan 27 07:53:28 2017 +0100 @@ -575,6 +575,10 @@ def test_internal_sizes(self): self.assertGreater(object.__basicsize__, 0) self.assertGreater(tuple.__itemsize__, 0) + + def test_slot_wrapper_types(self): + self.assertIsInstance(int.__lt__, types.SlotWrapperType) + self.assertIsInstance((42).__lt__, types.MethodWrapperType) class MappingProxyTests(unittest.TestCase): diff -r c5f6d122ddd6 Lib/types.py --- a/Lib/types.py Wed Sep 28 00:53:54 2016 +0200 +++ b/Lib/types.py Fri Jan 27 07:53:28 2017 +0100 @@ -36,6 +36,9 @@ BuiltinFunctionType = type(len) BuiltinMethodType = type([].append) # Same as BuiltinFunctionType +SlotWrapperType = type(object.__init__) +MethodWrapperType = type(object().__str__) + ModuleType = type(sys) try: