gh-144473: Add "steal" term to glossary; clarify "stealing" on error#144474
Closed
encukou wants to merge 13 commits intopython:mainfrom
Closed
gh-144473: Add "steal" term to glossary; clarify "stealing" on error#144474encukou wants to merge 13 commits intopython:mainfrom
encukou wants to merge 13 commits intopython:mainfrom
Conversation
With one exception, all "stealing" functions also steal on error, but it makes sense to note this in each case.
vstinner
reviewed
Feb 4, 2026
|
|
||
| steal | ||
| In Python's C API, "*stealing*" an argument means that ownership of the | ||
| argument is transferred to the called function. |
Member
There was a problem hiding this comment.
You may add something like: "The caller must not use that reference after the call".
Member
Author
There was a problem hiding this comment.
I added that to the api-refcountdetails that's linked below. Do you think it needs to be here as well?
Member
There was a problem hiding this comment.
Do you think it needs to be here as well?
Yes, IMO it's worth it to repeat it here.
| created, the old reference to *bytes* will still be discarded and the value | ||
| of *\*bytes* will be set to ``NULL``; the appropriate exception will be set. | ||
| appended to *bytes*; the caller will own the new reference. | ||
| The reference to the old value of *bytes* will be ":term:`stolen <steal>`". |
Member
There was a problem hiding this comment.
I'm not a huge fan of putting "steal(s)" in quotations. If the user is confused about the term, then they can just click it to go to the glossary. Otherwise, the user knows the term, so it shouldn't be in scare quotes.
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
…python#144339) Ignore "math.integer" extension if "math" is in sys.stdlib_module_names.
pythonGH-141985) Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
…GH-144279) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
…44369) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
…ythonGH-144154) Suggest the normalized name or the closest name to the normalized name. If the suggested name is not ASCII, include also its ASCII representation.
…ns` and `itertools.combinations_with_replacement` thread-safe (pythongh-144402)
…ythonGH-144437) * Add three new symbol kinds * Do not smuggle code object in _PUSH_FRAME operand * Fix small bug in predicate analysis
…on#144469) Move classmethod and staticmethod initialization from __init__() to __new__(). PyClassMethod_New() and PyStaticMethod_New() now copy attributes of the wrapped functions: __module__, __name__, __qualname__ and __doc__. Change static type initialization: initialize PyStaticMethod_Type and PyCFunction_Type earlier. Remove test_refleaks_in_classmethod___init__() and test_refleaks_in_staticmethod___init__() tests from test_descr since classmethod and staticmethod have no __init__() method anymore.
* Update to 2.7.4 * update expat license copyright year to match and a pedantic #define * include COPYING update in refresh.sh * Update checksum for copying --------- Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Petr Viktorin <encukou@gmail.com>
Member
Author
|
Sorry for the noise, everyone :( New PR: 144502 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 Documentation preview 📚: https://cpython-previews--144474.org.readthedocs.build/