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
6b16d938
Commit
6b16d938
authored
Aug 26, 2019
by
Joannah Nanjekye
Committed by
Raymond Hettinger
Aug 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-15542: Documentation incorrectly suggests __init__ called after direct __new__ call (GH-15478)
parent
1039f39c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Doc/reference/datamodel.rst
Doc/reference/datamodel.rst
+4
-4
No files found.
Doc/reference/datamodel.rst
View file @
6b16d938
...
...
@@ -1166,10 +1166,10 @@ Basic customization
with appropriate arguments and then modifying the newly-created instance
as necessary before returning it.
If :meth:`__new__`
returns an instance of *cls*, then the new instance's
:meth:`__init__` method will be invoked like ``__init__(self[, ...])``, where
*self* is the new instance and the remaining arguments are the same as wer
e
passed to :meth:`__new__`
.
If :meth:`__new__`
is invoked during object construction and it returns an
instance or subclass of *cls*, then the new instance’s :meth:`__init__` method
will be invoked like ``__init__(self[, ...])``, where *self* is the new instanc
e
and the remaining arguments are the same as were passed to the object constructor
.
If :meth:`__new__` does not return an instance of *cls*, then the new instance's
:meth:`__init__` method will not be invoked.
...
...
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