Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
08c16016
Commit
08c16016
authored
Apr 25, 2017
by
Jim Fasarakis-Hilliard
Committed by
Berker Peksag
Apr 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo:29950: Rename SlotWrapperType to WrapperDescriptorType (GH-926)
parent
97bf722f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
Doc/library/types.rst
Doc/library/types.rst
+1
-1
Lib/test/test_types.py
Lib/test/test_types.py
+4
-4
Lib/types.py
Lib/types.py
+1
-1
Misc/NEWS
Misc/NEWS
+1
-1
No files found.
Doc/library/types.rst
View file @
08c16016
...
...
@@ -132,7 +132,7 @@ Standard names are defined for the following types:
C".)
.. data::
SlotWrappe
rType
.. data::
WrapperDescripto
rType
The type of methods of some built-in data types and base classes such as
:meth:`object.__init__` or :meth:`object.__lt__`.
...
...
Lib/test/test_types.py
View file @
08c16016
...
...
@@ -577,10 +577,10 @@ class TypesTests(unittest.TestCase):
self
.
assertGreater
(
tuple
.
__itemsize__
,
0
)
def
test_slot_wrapper_types
(
self
):
self
.
assertIsInstance
(
object
.
__init__
,
types
.
SlotWrappe
rType
)
self
.
assertIsInstance
(
object
.
__str__
,
types
.
SlotWrappe
rType
)
self
.
assertIsInstance
(
object
.
__lt__
,
types
.
SlotWrappe
rType
)
self
.
assertIsInstance
(
int
.
__lt__
,
types
.
SlotWrappe
rType
)
self
.
assertIsInstance
(
object
.
__init__
,
types
.
WrapperDescripto
rType
)
self
.
assertIsInstance
(
object
.
__str__
,
types
.
WrapperDescripto
rType
)
self
.
assertIsInstance
(
object
.
__lt__
,
types
.
WrapperDescripto
rType
)
self
.
assertIsInstance
(
int
.
__lt__
,
types
.
WrapperDescripto
rType
)
def
test_method_wrapper_types
(
self
):
self
.
assertIsInstance
(
object
().
__init__
,
types
.
MethodWrapperType
)
...
...
Lib/types.py
View file @
08c16016
...
...
@@ -36,7 +36,7 @@ MethodType = type(_C()._m)
BuiltinFunctionType
=
type
(
len
)
BuiltinMethodType
=
type
([].
append
)
# Same as BuiltinFunctionType
SlotWrappe
rType
=
type
(
object
.
__init__
)
WrapperDescripto
rType
=
type
(
object
.
__init__
)
MethodWrapperType
=
type
(
object
().
__str__
)
MethodDescriptorType
=
type
(
str
.
join
)
...
...
Misc/NEWS
View file @
08c16016
...
...
@@ -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
SlotWrappe
rType
,
MethodWrapperType
,
and
-
Issue
#
29377
:
Add
WrapperDescripto
rType
,
MethodWrapperType
,
and
MethodDescriptorType
built
-
in
types
to
types
module
.
Original
patch
by
Manuel
Krebber
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment