Skip to content

Commit

Permalink
bpo:29950: Rename SlotWrapperType to WrapperDescriptorType (GH-926)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitrisJim authored and berkerpeksag committed Apr 25, 2017
1 parent 97bf722 commit 08c1601
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Doc/library/types.rst
Expand Up @@ -132,7 +132,7 @@ Standard names are defined for the following types:
C".)


.. data:: SlotWrapperType
.. data:: WrapperDescriptorType

The type of methods of some built-in data types and base classes such as
:meth:`object.__init__` or :meth:`object.__lt__`.
Expand Down
8 changes: 4 additions & 4 deletions Lib/test/test_types.py
Expand Up @@ -577,10 +577,10 @@ def test_internal_sizes(self):
self.assertGreater(tuple.__itemsize__, 0)

def test_slot_wrapper_types(self):
self.assertIsInstance(object.__init__, types.SlotWrapperType)
self.assertIsInstance(object.__str__, types.SlotWrapperType)
self.assertIsInstance(object.__lt__, types.SlotWrapperType)
self.assertIsInstance(int.__lt__, types.SlotWrapperType)
self.assertIsInstance(object.__init__, types.WrapperDescriptorType)
self.assertIsInstance(object.__str__, types.WrapperDescriptorType)
self.assertIsInstance(object.__lt__, types.WrapperDescriptorType)
self.assertIsInstance(int.__lt__, types.WrapperDescriptorType)

def test_method_wrapper_types(self):
self.assertIsInstance(object().__init__, types.MethodWrapperType)
Expand Down
2 changes: 1 addition & 1 deletion Lib/types.py
Expand Up @@ -36,7 +36,7 @@ def _m(self): pass
BuiltinFunctionType = type(len)
BuiltinMethodType = type([].append) # Same as BuiltinFunctionType

SlotWrapperType = type(object.__init__)
WrapperDescriptorType = type(object.__init__)
MethodWrapperType = type(object().__str__)
MethodDescriptorType = type(str.join)

Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS
Expand Up @@ -512,7 +512,7 @@ Library
- Issue #29444: Fixed out-of-bounds buffer access in the group() method of
the match object. Based on patch by WGH.

- Issue #29377: Add SlotWrapperType, MethodWrapperType, and
- Issue #29377: Add WrapperDescriptorType, MethodWrapperType, and
MethodDescriptorType built-in types to types module.
Original patch by Manuel Krebber.

Expand Down

0 comments on commit 08c1601

Please sign in to comment.