summaryrefslogtreecommitdiffstats
path: root/Doc/reference
Commit message (Collapse)AuthorAgeFilesLines
* [3.8] [3.11] Add single value `agen.athrow(value)` signature to the 3.11 ↵Miss Islington (bot)2023-07-051-1/+2
| | | | | | | docs gh-105269 (GH-105468) (#105478) (cherry picked from commit acf3916e84158308660ed07c474a564e045d6884) Co-authored-by: Federico Caselli <CaselIT@users.noreply.github.com>
* bpo-45583: Correct datamodel documentation of int() (GH-29182) (GH-29287)Miss Islington (bot)2021-10-281-2/+2
| | | | | | | It should be noted that this part of the documentation is redundant with function.rst's documentation of int. This one was correctly updated with Python 3.8. (cherry picked from commit d9c1868c25ec6466e8d8ae21fe9315a8a03836ab) Co-authored-by: Arthur Milchior <arthur@milchior.fr>
* bpo-45104: Clarify when __init__ is called (GH-28210) (GH-28213)Miss Islington (bot)2021-09-071-1/+1
| | | | | (cherry picked from commit fa15df77f02ba4a66ba0b71989381a426038be01) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-42800: Add audit events for f_code and tb_frame (GH-24182)Miss Islington (bot)2021-05-031-0/+6
| | | | | | | | | | | Accessing the following attributes will now fire PEP 578 style audit hooks as (object.__getattr__, obj, name): * PyTracebackObject: tb_frame * PyFrameObject: f_code * PyGenObject: gi_code, gi_frame * PyCoroObject: cr_code, cr_frame * PyAsyncGenObject: ag_code, ag_frame (cherry picked from commit bb2f3ff7a8f0c3565ccc1946dba7e09a3f7dc209) Co-authored-by: Steve Dower <steve.dower@python.org>
* Fix a typo in datamodel reference document (GH-24930)Miss Islington (bot)2021-04-251-1/+1
| | | | | (cherry picked from commit a1a5e3c4c83c3e3fe24c96ae22dfdedc7e23a1bb) Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* Fix description of behaviour of an exception class in 'from' clause ↵Miss Islington (bot)2021-04-111-4/+7
| | | | | | | | | (GH-24303) (GH-25342) (cherry picked from commit 79650d0118b0a8861428b9dd063089de405cf137) Co-authored-by: Mark Dickinson <mdickinson@enthought.com> Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
* [3.8] bpo-36540: Improve doc of function definition regarding ↵Saiyang Gou2021-04-071-2/+8
| | | | | | | positional-only arguments (GH-25235) (GH-25260) (cherry picked from commit 58d72cab89cf9652acc0bf0007aa20b2bcc98499) Co-authored-by: Saiyang Gou <gousaiyang@163.com>
* bpo-27646: Say that 'yield from' expression can be any iterable (GH-24595)Miss Islington (bot)2021-02-211-2/+2
| | | | | | Previously, the doc at least strongly implied that it had to be an iterator. (cherry picked from commit 2f9ef514fb24b6a95bd3272885f197752810c107) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.8] [doc] Fix a few margins due to bad markup (GH-23619). (GH-23860)Andre Delfino2020-12-221-1/+0
| | | | | (cherry picked from commit 96a09df64483b70c4215c7025a19b9d2f1636c55) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* bpo-42669: Document that `except` rejects nested tuples (GH-23822) (GH-23871)Miss Islington (bot)2020-12-201-1/+2
| | | | | | | | | | | | | | | | | | In Python 2, it was possible to use `except` with a nested tuple, and occasionally natural. For example, `zope.formlib.interfaces.InputErrors` is a tuple of several exception classes, and one might reasonably think to do something like this: try: self.getInputValue() return True except (InputErrors, SomethingElse): return False As of Python 3.0, this raises `TypeError: catching classes that do not inherit from BaseException is not allowed` instead: one must instead either break it up into multiple `except` clauses or flatten the tuple. However, the reference documentation was never updated to match this new restriction. Make it clear that the definition is no longer recursive. Automerge-Triggered-By: GH:ericvsmith (cherry picked from commit c95f8bc2700b42f4568886505a819816c9b0ba28) Co-authored-by: Colin Watson <cjwatson@debian.org> Co-authored-by: Colin Watson <cjwatson@debian.org>
* [3.8] bpo-39416: change word case to not imply ABC (GH-22867) (GH-22869)Miss Islington (bot)2020-12-161-1/+1
| | | | | follow-up to bpo-39416 Co-authored-by: kpinc <kop@karlpinc.com>
* bpo-6761: Enhance __call__ documentation (GH-7987)Miss Skeleton (bot)2020-10-271-1/+1
| | | | | (cherry picked from commit 95f710c55714153f0c8cce48f8215bb3d866ac1d) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* bpo-29981: Add examples and update index for set, dict, and generator ↵Miss Skeleton (bot)2020-10-251-0/+4
| | | | | | | | comprehensions'(GH-20272) Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr> (cherry picked from commit 2d55aa9e37c9c84f4f6a8135d0326da0bcd8f38b) Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
* bpo-41910: specify the default implementations of object.__eq__ and ↵Miss Skeleton (bot)2020-10-221-6/+8
| | | | | | | object.__ne__ (GH-22874) (#22877) See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython. Co-authored-by: Brett Cannon <brett@python.org>
* bpo-35181: Correct importlib documentation for some module attributes (GH-15190)Miss Skeleton (bot)2020-10-211-15/+3
| | | | | | | | | | | | | | | | | | @ericsnowcurrently This PR will change the following: In the library documentation importlib.rst: - `module.__package__` can be `module.__name__` for packages; - `spec.parent` can be `spec.__name__` for packages; - `spec.loader` is not `None` for namespaces packages. In the language documentation import.rst: - `spec.loader` is not `None` for namespace packages. Automerge-Triggered-By: GH:warsaw (cherry picked from commit 27f1bd8787d24ac53cc3dc6ea5eb00b8a3499839) Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* [3.8] bpo-39416: Document some restrictions on the default string ↵Miss Skeleton (bot)2020-10-211-0/+18
| | | | | | | | | | | | | | | | | | | | | | representations of numeric classes (GH-18111) (GH-22861) [[bpo-39416]()](): Document string representations of the Numeric classes This is a change to the specification of the Python language. The idea here is to put sane minimal limits on the Python language's default representations of its Numeric classes. That way "Marty's Robotic Massage Parlor and Python Interpreter" implementation of Python won't do anything too crazy. Some discussion in the email thread: Subject: Documenting Python's float.__str__() https://mail.python.org/archives/list/python-dev@python.org/thread/FV22TKT3S2Q3P7PNN6MCXI6IX3HRRNAL/ (cherry picked from commit c60394c7fc9cc09b16e9675a3eeb5844b6d8523f) Co-authored-by: kpinc <kop@karlpinc.com> Automerge-Triggered-By: GH:merwok
* Doc: Fix a typo/error in the docs for cached bytecode (GH-22445)Miss Skeleton (bot)2020-10-211-1/+1
| | | | | (cherry picked from commit cb115e36e1aba04b90b0ecac6f043e60064ac65b) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* Doc: Remove old Python version from future stmt (GH-21802)Miss Skeleton (bot)2020-10-211-2/+2
| | | | | (cherry picked from commit eba109a28f48b20b05f08abbe6604eebb07788f9) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* bpo-41192: Add documentation of undocumented audit events (GH-22832)Miss Skeleton (bot)2020-10-201-0/+18
| | | | (cherry picked from commit 3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7)
* [3.8] bpo-41855: Fix duplicate results in FastPath.zip_children() (#22404)Jason R. Coombs2020-10-151-0/+2
| | | | | | | * bpo-41855: Backport fixes from importlib_metadata 1.5.2. * Add blurb. * Add anchor for finders and loaders
* bpo-41584: clarify when the reflected method of a binary arithemtic operator ↵Miss Skeleton (bot)2020-10-051-7/+8
| | | | | | | is called (GH-22505) (cherry picked from commit d02d824e05e2cb86f4df381be18832e76e2c475f) Co-authored-by: Brett Cannon <brett@python.org>
* bpo-41762: Fix usage of productionlist markup in the doc (GH-22281) (GH-22300)Miss Islington (bot)2020-09-186-66/+67
| | | | | | | | | | Use an unique identifier for the different grammars documented using the Sphinx productionlist markup. productionlist markups of the same grammar, like "expressions" or "compound statements", use the same identifier "python-grammar". (cherry picked from commit 8af239eacfcf52e4e0e2b0223e7cea4672309483) Co-authored-by: Victor Stinner <vstinner@python.org>
* [doc] Remove superfluous comment about equal in f-strings (GH-22006)Miss Islington (bot)2020-09-101-1/+1
| | | | | | Automerge-Triggered-By: @kushaldas (cherry picked from commit 788b79fa7b6184221e68d4f1a3fbe0b3270693f6) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* [3.8] [3.9] bpo-41688: Document bug in **= dispatching in the language ↵Miss Islington (bot)2020-09-091-0/+7
| | | | | | | | | | data… (GH-22172) (GH-22175) (cherry picked from commit 46bc21e1780016aaacd34e472f838dc792fb674c) Co-authored-by: Ammar Askar <ammar@ammaraskar.com> Automerge-Triggered-By: @brettcannon
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) (GH-21928)Victor Stinner2020-08-202-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the c_warn_on_allowed_pre_v3 option to make the documentation compatible with Sphinx 2 and Sphinx 3. (cherry picked from commit 423e77d6de497931585d1883805a9e3fa4096b0b) * bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858) Use generic '.. object::' to declare markers, rather than abusing '.. c:function::' which fails on Sphinx 3. (cherry picked from commit 43577c01a2ab49122db696e9eaec6cb31d11cc81) * bpo-40204: Fix duplicates in the documentation (GH-21857) Fix two Sphinx 3 issues: Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'. Declaration is 'PyBUF_ND'. Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'. Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'. (cherry picked from commit 46d10b1237c67ff8347f533eda6a5468d098f7eb) * bpo-40204: Add :noindex: in the documentation (GH-21859) Add :noindex: to duplicated documentation to fix "duplicate object description" errors. For example, fix this Sphinx 3 issue: Doc/library/configparser.rst:1146: WARNING: duplicate object description of configparser.ConfigParser.optionxform, other instance in library/configparser, use :noindex: for one of them (cherry picked from commit d3ded080482beae578faa704b13534a62d066f9f) * bpo-40204, doc: Fix syntax of C variables (GH-21846) 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. (cherry picked from commit 474652fe9346382dbf793f20b671eb74668bebde) * bpo-40204: Fix reference to terms in the doc (GH-21865) Sphinx 3 requires to refer to terms with the exact case. For example, fix the Sphinx 3 warning: Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case sensitive match.made a reference to loader instead. (cherry picked from commit bb0b08540cc93e56f3f1bde1b39ce086d9e35fe1) * bpo-40204: Fix duplicated productionlist names in the doc (GH-21900) Sphinx 3 disallows having more than one productionlist markup with the same name. Simply remove names in this case, since names are not shown anyway. For example, fix the Sphinx 3 warning: Doc/reference/introduction.rst:96: duplicate token description of *:name, other instance in reference/expressions (cherry picked from commit 1abeda80f760134b4233608e2c288790f955b95a) (cherry picked from commit 8f88190af529543c84d5dc78f19abbfd73335cf4)
* [3.8] bpo-41045: Document debug feature of f-strings ('=') (GH-21509) (#21647)Guido van Rossum2020-07-271-5/+32
| | | | | | | Co-Authored-By: Rishi <rishi93dev@gmail.com> (cherry picked from commit 13efaec) Co-authored-by: amaajemyfren <32741226+amaajemyfren@users.noreply.github.com>
* bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) ↵Miss Islington (bot)2020-07-251-2/+19
| | | | | | | (GH-18851) (cherry picked from commit f117cef25b5ffc4db9fbe373ddb65e14f59f0397) Co-authored-by: Shankar Jha <shankarj67@gmail.com>
* bpo-40439: Update broken link in lexical analysis docs (GH-20184)Miss Islington (bot)2020-05-231-1/+1
| | | | | | Automerge-Triggered-By: @csabella (cherry picked from commit af23f0d3cf19343512e6ca1fe1d46a5dbe425719) Co-authored-by: Matteo Bertucci <matteobertucci2004@gmail.com>
* Fix misinformation about NaN != NaN comparison (GH-19357) (GH-19383)Miss Islington (bot)2020-04-051-2/+3
| | | | | | (cherry picked from commit 810f68f1282c917fc1ad6af540a9f08524dfe310) Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
* fix comma location in various places (GH-19233)Miss Islington (bot)2020-03-302-2/+2
| | | | | (cherry picked from commit c49016e67c3255b37599b354a8d7995d40663991) Co-authored-by: Mathieu Dupuy <deronnax@users.noreply.github.com>
* bpo-40045: Make "dunder" method documentation easier to locate (GH-19153) ↵Miss Islington (bot)2020-03-271-5/+5
| | | | | | | | | | | | | | | | (GH-19198) * issue 40045 * Update lexical_analysis.rst Make "dunder" method documentation easier(GH-19153) Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com> (cherry picked from commit 5f9c131c099d6675d1a9d0228497865488afd548) Co-authored-by: Javad Mokhtari <javadmokhtari@outlook.com> Co-authored-by: Javad Mokhtari <javadmokhtari@outlook.com>
* bpo-39879: Update datamodel docs to include dict ordering (GH-19006)Miss Islington (bot)2020-03-261-0/+10
| | | | | | Co-authored-by: furkanonder <furkantahaonder@gmail.com> (cherry picked from commit 59c644eaa72b0cc48302f59d66852c4ea8332eba) Co-authored-by: Lahfa Samy <lahfa121999@gmail.com>
* bpo-17422: slightly more precise language (GH-18682)Miss Islington (bot)2020-03-061-1/+1
| | | | | (cherry picked from commit e59334ebc9308b0f3ad048ef293c6b49e6456d1a) Co-authored-by: Caleb Donovick <cdonovick@users.noreply.github.com>
* bpo-39868: Update Language Reference for PEP 572. (GH-18793)Miss Islington (bot)2020-03-062-6/+18
| | | | | (cherry picked from commit 8bae21962bab2fac7630982abd73676b89930902) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* bpo-17422: Language reference should specify restrictions on class namespace ↵Miss Islington (bot)2020-02-221-2/+4
| | | | | | | | (GH-18559) The language reference now specifies restrictions on class namespaces. Adapted from a patch by Ethan Furman. (cherry picked from commit fbe2e0bb8a7ee75d0f9d57682436dac7d69e202e) Co-authored-by: ananthan-123 <ananthakrishnan15.2001@gmail.com>
* bpo-39545: Document changes in the support of await in f-strings. (GH-18456)Miss Islington (bot)2020-02-141-0/+5
| | | | | | https://bugs.python.org/issue39545 (cherry picked from commit f632736023502816f2e6bd714d1b48c81aa2ccc1) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Improve grammar in the import system reference documentation (GH-18209)Miss Islington (bot)2020-02-101-1/+1
| | | | | | | | Replaced the period with a comma. Automerge-Triggered-By: @Mariatta (cherry picked from commit d47d0c8e9f2ca0f9f5d1bf0b35006a9a4d5ca684) Co-authored-by: Bonifacio de Oliveira <bonifacio.segundo@gmail.com>
* bpo-15243: Document __prepare__ as classmethod (GH-17124)Miss Islington (bot)2020-01-251-1/+2
| | | | | | (cherry picked from commit 7de617455ed788e6730c40cf854c4b72b0432194) Co-authored-by: alclarks <57201106+alclarks@users.noreply.github.com>
* Fix the parameter list of object. _rpow_ (GH-GH-16477)Miss Islington (bot)2020-01-051-1/+1
| | | | | (cherry picked from commit abc0c4fa9970931849b3da598c5980a5b170661e) Co-authored-by: HongWeipeng <961365124@qq.com>
* bpo-39037: Fix lookup order of magic methods in with statement documentation ↵Miss Islington (bot)2019-12-301-18/+49
| | | | | | | | | | | | | (GH-17608) * __enter__ is now looked up before __exit__ to give a more intuitive error message * add pseudo-code equivalent for the with statement * fix pseudo-code for the async with statement to use a finally clause * use SUITE rather than BLOCK for consistency with the language grammar Patch by Géry Ogam. (cherry picked from commit 226e6e7d4326cf91ef37e13528eb1f62de1bb832) Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* [3.8] bpo-38316: Fix co_stacksize documentation (GH-16983) (GH-17661)Batuhan Taşkaya2019-12-191-2/+2
| | | | | | | | | | | | | | | (cherry picked from commit d587272fe3b0fcad2f23a490e76f9f82ca7d64ef) Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com> https://bugs.python.org/issue38316 Automerge-Triggered-By: @vstinner
* bpo-38524: clarify example a bit and improve formatting (GH-17406)Miss Islington (bot)2019-11-281-5/+8
| | | | | (cherry picked from commit 02519f75d15b063914a11351da30178ca4ceb54b) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
* bpo-38524: document implicit and explicit calling of descriptors' ↵Miss Islington (bot)2019-11-271-1/+12
| | | | | | | __set_name__ (GH-17364) (cherry picked from commit 1bddf890e595a865414645c6041733043c4081f8) Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
* bpo-25866: Minor cleanups to "sequence" in docs (GH-17177) (GH-17208)Miss Islington (bot)2019-11-171-5/+9
| | | | | (cherry picked from commit 4544e78ec4558b75bf95e5b7dfc1b5bbb07ae5f0) Co-authored-by: alclarks <57201106+alclarks@users.noreply.github.com>
* Fix minor typos. (GH-17095)Miss Islington (bot)2019-11-131-3/+3
| | | | | (cherry picked from commit 2d56af7a94fe7ec0bdf3011652558ae1b889b4a8) Co-authored-by: Shu <23287722+susan-shu-c@users.noreply.github.com>
* bpo-38434: Fixes some audit event documentation (GH-16932)Miss Skeleton (bot)2019-10-261-0/+1
| | | | | (cherry picked from commit 894e30ce0bcc1c509eb01c8ffa9ba6d7701aeaaf) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-35224: Additional documentation for Assignment Expressions (GH-15935) ↵Miss Islington (bot)2019-09-112-1/+3
| | | | | | | | | | | | | | | (GH-15967) Add or update assignment expression documentation for: - FAQ - Design - Reference - Expressions - Reference - Lexical Analysis https://bugs.python.org/issue35224 Automerge-Triggered-By: @matrixise (cherry picked from commit 6357c95716d89ac1f80587fbc4133df8d2e8396c) Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
* bpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760) (GH-15940)Miss Islington (bot)2019-09-111-4/+4
| | | | | | | | https://bugs.python.org/issue33459 Automerge-Triggered-By: @matrixise (cherry picked from commit dc269971091710563a0d730a0d4b084901826c15) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)Steve Dower2019-09-101-1/+3
|
* bpo-36743: __get__ is sometimes called without the owner argument (GH-12992) ↵Miss Islington (bot)2019-08-291-7/+18
| | | | | | | (GH-15589) (cherry picked from commit 0dac68f1e593c11612ed54af9edb865d398f3b05) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>