diff -r 3d328ee18612 -r 2f08a506f8ee Doc/library/types.rst --- a/Doc/library/types.rst Mon Jan 30 13:56:20 2017 +0300 +++ b/Doc/library/types.rst Mon Jan 30 12:16:49 2017 +0100 @@ -131,7 +131,30 @@ methods of built-in classes. (Here, the term "built-in" means "written in C".) + +.. data:: SlotWrapperType + The type of methods of some built-in data types and base classes such as + :meth:`object.__init__` or :meth:`object.__lt__`. + + .. versionadded:: 3.7 + + +.. data:: MethodWrapperType + + The type of *bound* methods of some built-in data types and base classes. + For example it is the type of :code:`object().__str__`. + + .. versionadded:: 3.7 + + +.. data:: MethodDescriptorType + + The type of methods of some built-in data types such as :meth:`str.join`. + + .. versionadded:: 3.7 + + .. class:: ModuleType(name, doc=None) The type of :term:`modules `. Constructor takes the name of the diff -r 3d328ee18612 -r 2f08a506f8ee Lib/types.py --- a/Lib/types.py Mon Jan 30 13:56:20 2017 +0300 +++ b/Lib/types.py Mon Jan 30 12:16:49 2017 +0100 @@ -36,6 +36,10 @@ BuiltinFunctionType = type(len) BuiltinMethodType = type([].append) # Same as BuiltinFunctionType +SlotWrapperType = type(object.__init__) +MethodWrapperType = type(object().__str__) +MethodDescriptorType = type(str.join) + ModuleType = type(sys) try: