Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
ef90eded
Commit
ef90eded
authored
Feb 09, 2022
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: Reference the new section about "__cinit__" in a place where knowing the difference can help.
parent
01f291a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
docs/src/userguide/extension_types.rst
docs/src/userguide/extension_types.rst
+3
-2
No files found.
docs/src/userguide/extension_types.rst
View file @
ef90eded
...
@@ -478,8 +478,9 @@ Note that the path through ``__new__()`` will *not* call the type's
...
@@ -478,8 +478,9 @@ Note that the path through ``__new__()`` will *not* call the type's
``__init__()`` method (again, as known from Python). Thus, in the example
``__init__()`` method (again, as known from Python). Thus, in the example
above, the first instantiation will print ``eating!``, but the second will
above, the first instantiation will print ``eating!``, but the second will
not. This is only one of the reasons why the ``__cinit__()`` method is
not. This is only one of the reasons why the ``__cinit__()`` method is
safer and preferable over the normal ``__init__()`` method for extension
safer than the normal ``__init__()`` method for initialising extension types
types.
and bringing them into a correct and safe state.
See section :ref:`_initialisation_methods` about the differences.
The second performance improvement applies to types that are often created
The second performance improvement applies to types that are often created
and deleted in a row, so that they can benefit from a freelist. Cython
and deleted in a row, so that they can benefit from a freelist. Cython
...
...
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