summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/object.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-93738: Documentation C syntax (:c:type:`PyTypeObject*` -> ↵Miss Islington (bot)2022-10-051-1/+1
| | | | | | | | :c:expr:`PyTypeObject*`) (GH-97778) (#97892) Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> (cherry picked from commit c70c8b69762f720377adaf22f2e5ec6496a7be53) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* GH-92678: Document that you shouldn't be doing your own dictionary offset ↵Miss Islington (bot)2022-08-091-0/+18
| | | | | | | calculations. (GH-95598) (GH-95821) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com> Co-authored-by: Mark Shannon <mark@hotpy.org>
* Document Py_ssize_t. (GH-92512)Miss Islington (bot)2022-05-131-1/+1
| | | | | | | | | It fixes 252 errors from a Sphinx nitpicky run (sphinx-build -n). But there's 8182 errors left. Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> (cherry picked from commit 664aa94b570a4a8f3535efb2e3d638a4ab655943) Co-authored-by: Julien Palard <julien@palard.fr>
* More minor fixes to C API docs (GH-31525)Jelle Zijlstra2022-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * wording fixes in type.rst * grammar and punctuation in sys.rst * set: grammar fixes * structures: capitalization fix * grammar fixes for sequence * objects: point to Py_TYPE instead of direct object access * numbers: add more explicit Python equivalences * method: add missing period * memory: grammar fix * mapping: grammar fixes * long: grammar fix * iter: fix grammar for PyAIter_Check * init: grammar fix
* bpo-22039: [doc] clarify that there are no plans to disable deleting an ↵Irit Katriel2022-01-191-2/+3
| | | | attribute via PyObject_SetAttr (GH-30639)
* bpo-45123: PyAiter_Check and PyObject_GetAiter fix & rename. (GH-28194)Yury Selivanov2021-09-071-1/+1
| | | | | | | | Fix PyAiter_Check to only check for the `__anext__` presense (not for `__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`, `PyObject_GetAiter()` -> `PyObject_GetAIter()`. Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798)Mark Dickinson2021-06-191-2/+2
|
* bpo-31861: Complete the C-API docs for PyObject_GetAiter and PyAiter_Check ↵Pablo Galindo2021-03-231-0/+11
| | | | (GH-25004)
* bpo-43181: Convert PyObject_TypeCheck to static inline function (GH-24533)Erlend Egeberg Aasland2021-02-151-2/+2
|
* bpo-40204, doc: Fix syntax of C variables (GH-21846)Victor Stinner2020-08-131-1/+1
| | | | | | | | | | | | | | | For example, fix the following Sphinx 3 errors: Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters Invalid C declaration: Expected identifier in nested name. [error at 5] void \*obj -----^ Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*' Invalid C declaration: Expected end of definition. [error at 8] PyObject* --------^ The modified documentation is compatible with Sphinx 2 and Sphinx 3.
* bpo-39973: Fix the docs for PyObject_GenericSetDict() (GH-19026)Zackery Spytz2020-03-171-1/+1
| | | | PyObject_GenericSetDict() takes three arguments, not two.
* bpo-39153: Clarify C API *SetItem refcounting semantics (GH-18220)Joannah Nanjekye2020-01-291-1/+2
| | | | | | | | | | | | Some of the *SetItem methods in the C API steal a reference to the given value. This annotates the better behaved ones to assure the reader that these are not the ones with the inconsistent behaviour. * 📜🤖 Added by blurb_it. * make docs consistent with signature Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-36974: expand call protocol documentation (GH-13844)Jeroen Demeyer2019-11-121-240/+0
| | | | | | | | | | | | | | CC @encukou I'm also adding Petr Viktorin as contributor for vectorcall in the "what's new" section. https://bugs.python.org/issue36974 Automerge-Triggered-By: @encukou Automerge-Triggered-By: @encukou
* bpo-37645: add new function _PyObject_FunctionStr() (GH-14890)Jeroen Demeyer2019-11-051-0/+1
| | | | | | | | | | | | Additional note: the `method_check_args` function in `Objects/descrobject.c` is written in such a way that it applies to all kinds of descriptors. In particular, a future re-implementation of `wrapper_descriptor` could use that code. CC @vstinner @encukou https://bugs.python.org/issue37645 Automerge-Triggered-By: @encukou
* bpo-38600: NULL -> ``NULL``. (GH-17001)Serhiy Storchaka2019-10-301-1/+1
| | | Also fix some other formatting.
* bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)Serhiy Storchaka2019-10-301-36/+36
| | | | Replace all *NULL* with ``NULL``.
* bpo-37540: vectorcall: keyword names must be strings (GH-14682)Jeroen Demeyer2019-08-161-2/+2
| | | | | | | | The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon @vstinner https://bugs.python.org/issue37540
* bpo-37547: add _PyObject_CallMethodOneArg (GH-14685)Jeroen Demeyer2019-07-111-0/+12
|
* bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)Jeroen Demeyer2019-07-081-0/+11
|
* bpo-37483: add _PyObject_CallOneArg() function (#14558)Jeroen Demeyer2019-07-041-0/+11
|
* bpo-37337: Add _PyObject_VectorcallMethod() (GH-14228)Jeroen Demeyer2019-06-281-0/+22
|
* bpo-37194: Add PyObject_CallNoArgs() rationale (GH-14159)Victor Stinner2019-06-171-1/+2
| | | | Explain in the doc why PyObject_CallNoArgs() should be preferred over other existing ways to call a function without any arguments.
* bpo-37194: Complete PyObject_CallXXX() docs (GH-14156)Victor Stinner2019-06-171-8/+16
| | | | Mention explicitly that PyObject_CallXXX() functions raise an exception an failure.
* bpo-37194: Add a new public PyObject_CallNoArgs() function (GH-13890)Victor Stinner2019-06-171-0/+10
| | | | | | | | | | | | | | | Add a new public PyObject_CallNoArgs() function to the C API: call a callable Python object without any arguments. It is the most efficient way to call a callback without any argument. On x86-64, for example, PyObject_CallFunctionObjArgs(func, NULL) allocates 960 bytes on the stack per call, whereas PyObject_CallNoArgs(func) only allocates 624 bytes per call. It is excluded from stable ABI 3.8. Replace private _PyObject_CallNoArg() with public PyObject_CallNoArgs() in C extensions: _asyncio, _datetime, _elementtree, _pickle, _tkinter and readline.
* bpo-36974: document PEP 590 (GH-13450)Jeroen Demeyer2019-06-021-0/+77
|
* Doc: Replace the deprecated highlightlang directive by highlight. (#13377)Stéphane Wirtel2019-05-171-1/+1
| | | | highlightlang is deprecated since April 2018 in Sphinx. See https://github.com/sphinx-doc/sphinx/pull/4845
* bpo-35461: Document C API functions which suppress exceptions. (GH-11119)Serhiy Storchaka2018-12-181-0/+9
|
* bpo-5945: Improve mappings and sequences C API docs. (GH-7029)Serhiy Storchaka2018-05-221-4/+4
|
* Uniformize argument names of "call" functionsVictor Stinner2016-12-061-27/+46
| | | | | | | | | | | | Issue #28838: Rename parameters of the "calls" functions of the Python C API. * Rename 'callable_object' and 'func' to 'callable': any Python callable object is accepted, not only Python functions * Rename 'method' and 'nameid' to 'name' (method name) * Rename 'o' to 'obj' * Move, fix and update documentation of PyObject_CallXXX() functions in abstract.h * Update also the documentaton of the C API (update parameter names)
* Issue #25701: Document C API functions that both set and delete objectsMartin Panter2015-12-081-8/+19
| | | | | | Also document that the separate functions that delete objects are preferred; using PyObject_SetAttr(), _SetAttrString(), and PySequence_SetItem() to delete is deprecated.
* Fixed a typo.Serhiy Storchaka2015-05-021-1/+1
|
* Clean up the docs of PyObject_IsSubclass and PyObject_IsInstance, and ↵Georg Brandl2014-10-061-29/+34
| | | | mention that they call the PEP 3119 methods.
* PyObject not PyType (closes #18494)Benjamin Peterson2014-10-061-2/+2
|
* Fix a few scoping issues with versionadded/versionchanged directives.Georg Brandl2014-03-241-0/+1
|
* Merge in all documentation changes since branching 3.4.0rc1.Larry Hastings2014-03-161-3/+3
|
* Issue #20500: Note other public APIs with the new assertionNick Coghlan2014-02-091-2/+5
|
* Note the new debug assertion in PyObject_StrNick Coghlan2014-02-091-0/+4
|
* Issue 19195: Improved cross-references in C API documentation.Serhiy Storchaka2013-10-091-10/+10
|\
| * Issue 19195: Improved cross-references in C API documentation.Serhiy Storchaka2013-10-091-10/+10
| |
* | Issue #9369: The types of `char*` arguments of PyObject_CallFunction() andSerhiy Storchaka2013-05-291-2/+8
| | | | | | | | | | PyObject_CallMethod() now changed to `const char*`. Based on patches by Jörg Müller and Lars Buitinck.
* | Merge from 3.3: Add a str class entry to the string section (issue #16209).Chris Jerdonek2012-11-281-2/+2
|\ \ | |/ | | | | | | | | This commit also moves the documentation for the str built-in function to the new class entry. Links to :class:`str` now go to the class entry with the string methods immediately afterwards.
| * Add a str class entry to the "Text Sequence Type" section (issue #16209).Chris Jerdonek2012-11-281-2/+2
| | | | | | | | | | | | This commit also moves the documentation for the str built-in function to the new class entry. Links to :class:`str` now go to the class entry with the string methods immediately afterwards.
* | Issue #16148: Small improvements and cleanup. Added version informationArmin Ronacher2012-10-071-0/+2
| | | | | | | | to docs.
* | Issue #16148: implemented PEP 424Armin Ronacher2012-10-061-0/+7
|/
* write versionaddedBenjamin Peterson2012-02-201-0/+4
|
* add generic implementation of a __dict__ descriptor for C typesBenjamin Peterson2012-02-201-0/+12
|
* Add doc for Py_RETURN_NOTIMPLEMENTED, added in #12724.Brian Curtin2011-08-111-0/+13
|
* The version* directives don’t work with a blank line between argumentsÉric Araujo2011-04-241-1/+0
|
* Issue #10912: Clarify the documentation of PyObject_RichCompareBool. Thanks ↵Eli Bendersky2011-01-151-0/+3
| | | | to Devin Jeanpierre for spotting the problem.
* make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson2010-10-171-2/+7
|