summaryrefslogtreecommitdiffstats
path: root/Doc/reference
Commit message (Collapse)AuthorAgeFilesLines
* bpo-45003: Change __div__ to __truediv__ in py3 language reference. ↵Miss Islington (bot)2021-08-261-1/+1
| | | | | | | | (GH-27951) (GH-27962) (cherry picked from commit 806e25fd3173a80021e6df87b81263b5f6056f38) Co-authored-by: Objectivitix <79152594+Objectivitix@users.noreply.github.com>
* bpo-41911: Update docs for various expressions (GH-27470) (GH-27491)Miss Islington (bot)2021-07-301-7/+34
| | | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 4bd9caafb64589288e5171087070bde726178c58) Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
* bpo-8264: Document hasattr and getattr behavior for private attributes ↵Miss Islington (bot)2021-05-221-0/+2
| | | | | | | | | | (GH-23513) (GH-26238) Clarify ``getattr`` and ``setattr`` requirements for accessing name-mangled attributes Co-Authored-By: Catalin Iacob <iacobcatalin@gmail.com> (cherry picked from commit 2edaf6a4fb7e20324dde1423232f07211347f092) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* Update doc as relative import can be used with star import (GH-25667) (GH-26122)Miss Islington (bot)2021-05-141-1/+1
| | | | | | | (cherry picked from commit 3d4b5f1019123a7d74801500eb18ec8fa12136bc) Co-authored-by: Saiyang Gou <gousaiyang@163.com> Co-authored-by: Saiyang Gou <gousaiyang@163.com>
* bpo-42800: Add audit events for f_code and tb_frame (GH-24182)Steve Dower2021-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
* bpo-43990: Fix the footnote ordering in the operator precedence docs ↵Miss Islington (bot)2021-05-021-3/+3
| | | | (GH-25805) (GH-25819)
* 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>
* bpo-43837: Reverse order of precedence table to show tightly binding ↵Miss Islington (bot)2021-04-191-29/+29
| | | | operators first (GH-25469) (GH-25472)
* Fix description of behaviour of an exception class in 'from' clause ↵Miss Islington (bot)2021-04-111-4/+7
| | | | | | | | | (GH-24303) (GH-25341) (cherry picked from commit 79650d0118b0a8861428b9dd063089de405cf137) Co-authored-by: Mark Dickinson <mdickinson@enthought.com> Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
* [3.9] bpo-39702: Remove dotted_name from decorator documentation (GH-25234) ↵Miss Islington (bot)2021-04-081-1/+0
| | | | | | | | | | (GH-25290) (cherry picked from commit 1e051a21b7106a93c30b74aad7e1f40d6c0c477b) Co-authored-by: Saiyang Gou <gousaiyang@163.com> Automerge-Triggered-By: GH:brandtbucher
* [3.9] bpo-36540: Improve doc of function definition regarding ↵Saiyang Gou2021-04-071-2/+8
| | | | | | | positional-only arguments (GH-25235) (GH-25259) (cherry picked from commit 58d72cab89cf9652acc0bf0007aa20b2bcc98499) Co-authored-by: Saiyang Gou <gousaiyang@163.com>
* bpo-43755: Update docs to reflect that lambda is not allowed in `comp_if` ↵Miss Islington (bot)2021-04-071-3/+1
| | | | since 3.9 (GH-25231) (GH-25233)
* 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.9] [doc] Fix a few margins due to bad markup (GH-23619). (GH-23859)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-23870)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.9] bpo-41879: Doc: Fix description of async for statement (GH-23548) ↵Miss Islington (bot)2020-12-131-4/+4
| | | | | | | | | (GH-23749) Fix the wording in the documentation of `async for` to correctly describe asynchronous iterables. This fix is relevant for version 3.7 onward. (cherry picked from commit 4b8cdfcb22fbeaab9d954cb693a7fb3362a382b6) Co-authored-by: Nick Gaya <nicholasgaya+github@gmail.com>
* bpo-42198: Link to GenericAlias in typing and expressions (GH-23030)Miss Skeleton (bot)2020-10-301-7/+1
| | | | | | Follow up to 7cdf30fff39ea97f403b5472096349998d190e30 and 4173320920706b49a004bdddd8d7108e8984e3fc. This addresses the point "1. Update links in typing, subscription and union to point to GenericAlias." in the bpo for this PR. (cherry picked from commit 9129af6050b747f288baa9d4e7d43031647ed222) Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.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) (#22876) 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>
* Fix bpo-39416: Change "Numeric" to lower case; an english word, not a class ↵Miss Skeleton (bot)2020-10-211-1/+1
| | | | | | | | | | | | | | | | | name (GH-22867) This is a trivial fix to [bpo-39416](), which didn't come up until it was already committed ``` Change "Numeric" to "numeric". I believe this is trivial enough to not need an issue or a NEWS entry, although I'm unclear on what branches the original pull request received backports. ``` Automerge-Triggered-By: GH:merwok (cherry picked from commit f8b1ccd63c94bcde1c15d56d24add89861b6ceee) Co-authored-by: kpinc <kop@karlpinc.com>
* [3.9] bpo-39416: Document some restrictions on the default string ↵Miss Skeleton (bot)2020-10-211-0/+18
| | | | | | | | | | | | | | | | | | | | | | representations of numeric classes (GH-18111) (GH-22860) [[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>
* [3.9] bpo-42010: [docs] Clarify subscription of types (GH-22822) (GH-22840)Miss Skeleton (bot)2020-10-201-2/+13
| | | | | | | | (cherry picked from commit 7cdf30fff39ea97f403b5472096349998d190e30) Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com> Automerge-Triggered-By: GH:gvanrossum
* bpo-41192: Add documentation of undocumented audit events (GH-22831)Miss Skeleton (bot)2020-10-201-0/+18
| | | | (cherry picked from commit 3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7)
* 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)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.9] bpo-41688: Document bug in **= dispatching in the language data… ↵Ammar Askar2020-09-091-0/+7
| | | | | (GH-22172) I tossed in a "This bug is fixed in Python 3.10" sentence but I'm not sure if that's appropriate to have here.
* [3.9] bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901)Victor Stinner2020-08-192-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)
* [3.9] bpo-41045: Document debug feature of f-strings ('=') (GH-21509) (GH-21645)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>
* [3.9] bpo-40939: Use the new grammar for the grammar specification ↵Guido van Rossum2020-07-271-3/+15
| | | | | | | | | documentation (GH-19969) (#21641) (We censor the heck out of actions and some other stuff using a custom "highlighter".) (cherry picked from commit 72cabb2aa636272e608285f5a6ba83b62be9be4e) Co-authored-by: Pablo Galindo <Pablogsal@gmail.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>
* Update lexical_analysis.rst (GH-17508)Miss Islington (bot)2020-06-121-1/+1
| | | | | | | | Use Sphinx role markup for `str.format`. Automerge-Triggered-By: @csabella (cherry picked from commit e2fb8a2c42ee60c72a40d93da69e9efc4e359023) Co-authored-by: Géry Ogam <gery.ogam@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 typo in object.__format__ docs (GH-19504)Heshy Roskes2020-04-261-1/+1
|
* Fix misinformation about NaN != NaN comparison (GH-19357)Mark Dickinson2020-04-051-2/+3
|
* fix comma location in various places (GH-19233)Mathieu Dupuy2020-03-302-2/+2
|
* bpo-40045: Make "dunder" method documentation easier to locate (#19153)Javad Mokhtari2020-03-271-5/+5
| | | | | | | | | * issue 40045 * Update lexical_analysis.rst Make "dunder" method documentation easier(GH-19153) Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
* bpo-39879: Update datamodel docs to include dict ordering (GH-19006)Lahfa Samy2020-03-261-0/+10
| | | Co-authored-by: furkanonder <furkantahaonder@gmail.com>
* Update some www.unicode.org URLs to use HTTPS. (GH-18912)Benjamin Peterson2020-03-111-2/+2
|
* closes bpo-39926: Update Unicode to 13.0.0. (GH-18910)Benjamin Peterson2020-03-111-1/+1
|
* bpo-39702: Update the Language Reference (PEP 614) (GH-18802)Brandt Bucher2020-03-071-1/+11
|
* bpo-17422: slightly more precise language (GH-18682)Caleb Donovick2020-03-061-1/+1
|
* bpo-39868: Update Language Reference for PEP 572. (#18793)Brandt Bucher2020-03-062-6/+18
|
* bpo-35712: Make using NotImplemented in a boolean context issue a ↵MojoVampire2020-03-031-2/+7
| | | | deprecation warning (GH-13195)
* bpo-17422: Language reference should specify restrictions on class namespace ↵ananthan-1232020-02-221-2/+4
| | | | | (#18559) The language reference now specifies restrictions on class namespaces. Adapted from a patch by Ethan Furman.
* bpo-39545: Document changes in the support of await in f-strings. (GH-18456)Serhiy Storchaka2020-02-131-0/+5
| | | https://bugs.python.org/issue39545