aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* bpo-8264: Document hasattr and getattr behavior for private attributes ↵Ken Jin2021-02-021-0/+2
| | | | | | | | (GH-23513) Clarify ``getattr`` and ``setattr`` requirements for accessing name-mangled attributes Co-Authored-By: Catalin Iacob <iacobcatalin@gmail.com>
* Document new parenthesized with statements (GH-24281)Pablo Galindo2021-01-251-1/+14
|
* bpo-35790: Correct the description of sys.exc_info() and add a code example ↵Géry Ogam2020-12-211-3/+21
| | | | (GH-11625)
* bpo-42669: Document that `except` rejects nested tuples (GH-23822)Colin Watson2020-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
* [doc] Mention with and except clauses in globals() (GH-13232)Andre Delfino2020-12-191-1/+1
|
* [doc] Fix a few margins due to bad markup (GH-23619)Andre Delfino2020-12-171-1/+0
|
* bpo-41879: Doc: Fix description of async for statement (GH-23548)Nick Gaya2020-12-111-4/+4
| | | Fix the wording in the documentation of `async for` to correctly describe asynchronous iterables. This fix is relevant for version 3.7 onward.
* bpo-42485: [Doc] Link to PEP 617 from full grammar specification (GH-23532)James Gerity2020-11-301-1/+2
| | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-41229: Update docs for explicit aclose()-required cases and add ↵Joongi Kim2020-11-021-3/+13
| | | | | | | | | | | | | | | | | | | contextlib.aclosing() method (GH-21545) This is a PR to: * Add `contextlib.aclosing` which ia analogous to `contextlib.closing` but for async-generators with an explicit test case for [bpo-41229]() * Update the docs to describe when we need explicit `aclose()` invocation. which are motivated by the following issues, articles, and examples: * [bpo-41229]() * https://github.com/njsmith/async_generator * https://vorpus.org/blog/some-thoughts-on-asynchronous-api-design-in-a-post-asyncawait-world/#cleanup-in-generators-and-async-generators * https://www.python.org/dev/peps/pep-0533/ * https://github.com/achimnol/aiotools/blob/ef7bf0cea7af/src/aiotools/context.py#L152 Particuarly regarding [PEP-533](https://www.python.org/dev/peps/pep-0533/), its acceptance (`__aiterclose__()`) would make this little addition of `contextlib.aclosing()` unnecessary for most use cases, but until then this could serve as a good counterpart and analogy to `contextlib.closing()`. The same applies for `contextlib.closing` with `__iterclose__()`. Also, still there are other use cases, e.g., when working with non-generator objects with `aclose()` methods.
* bpo-42198: Link to GenericAlias in typing and expressions (GH-23030)kj2020-10-291-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.
* bpo-6761: Enhance __call__ documentation (GH-7987)Andre Delfino2020-10-271-1/+1
|
* bpo-41910: specify the default implementations of object.__eq__ and ↵Brett Cannon2020-10-211-6/+8
| | | | | | | object.__ne__ (GH-22874) See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython. Automerge-Triggered-By: GH:brettcannon
* bpo-35181: Correct importlib documentation for some module attributes (GH-15190)Géry Ogam2020-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
* Fix bpo-39416: Change "Numeric" to lower case; an english word, not a class ↵kpinc2020-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
* bpo-39416: Document some restrictions on the default string representations ↵kpinc2020-10-211-0/+18
| | | | | | | | | | | | | | | | of numeric classes (GH-18111) [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/
* Doc: Fix a typo/error in the docs for cached bytecode (GH-22445)Zackery Spytz2020-10-211-1/+1
|
* Doc: Remove old Python version from future stmt (GH-21802)Andre Delfino2020-10-211-2/+2
|
* bpo-42010: [docs] Clarify subscription of types (GH-22822)kj2020-10-201-2/+13
|
* bpo-29981: Add examples and update index for set, dict, and generator ↵Florian Dahlitz2020-10-201-0/+4
| | | | | | comprehensions'(GH-20272) Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
* bpo-41192: Add documentation of undocumented audit events (GH-21308)Saiyang Gou2020-10-201-0/+18
|
* [doc] Remove mention of async and await as soft keywords (GH-22144)Andre Delfino2020-10-121-4/+5
|
* bpo-38605: Make 'from __future__ import annotations' the default (GH-20434)Batuhan Taskaya2020-10-061-7/+3
| | | | | The hard part was making all the tests pass; there are some subtle issues here, because apparently the future import wasn't tested very thoroughly in previous Python versions. For example, `inspect.signature()` returned type objects normally (except for forward references), but strings with the future import. We changed it to try and return type objects by calling `typing.get_type_hints()`, but fall back on returning strings if that function fails (which it may do if there are future references in the annotations that require passing in a specific namespace to resolve).
* bpo-41584: clarify when the reflected method of a binary arithemtic operator ↵Brett Cannon2020-10-051-7/+8
| | | | is called (#22505)
* bpo-41762: Fix usage of productionlist markup in the doc (GH-22281)Victor Stinner2020-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".
* [doc] Remove superfluous comment about equal in f-strings (GH-22006)Andre Delfino2020-09-091-1/+1
| | | Automerge-Triggered-By: @kushaldas
* bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)Victor Stinner2020-08-171-1/+1
| | | | | | | | 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
* bpo-40204: Fix reference to terms in the doc (GH-21865)Victor Stinner2020-08-141-2/+2
| | | | | | | | 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.
* bpo-41045: Document debug feature of f-strings ('=') (GH-21509)amaajemyfren2020-07-271-5/+32
| | | | | Co-Authored-By: Rishi <rishi93dev@gmail.com> Automerge-Triggered-By: @gvanrossum
* bpo-40939: Use the new grammar for the grammar specification documentation ↵Pablo Galindo2020-07-271-3/+15
| | | | | | | (GH-19969) (We censor the heck out of actions and some other stuff using a custom "highlighter".) Co-authored-by: Guido van Rossum <guido@python.org>
* bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) ↵Shankar Jha2020-07-251-2/+19
| | | | (#18851)
* Stick with the phrase "default parameter value" (GH-21590)Andre Delfino2020-07-221-2/+2
|
* Update lexical_analysis.rst (GH-17508)Géry Ogam2020-06-121-1/+1
| | | | | Use Sphinx role markup for `str.format`. Automerge-Triggered-By: @csabella
* bpo-40439: Update broken link in lexical analysis docs (GH-20184)Matteo Bertucci2020-05-221-1/+1
| | | Automerge-Triggered-By: @csabella
* Fix typo in object.__format__ docs (GH-19504)Heshy Roskes2020-04-251-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-101-2/+2
|
* closes bpo-39926: Update Unicode to 13.0.0. (GH-18910)Benjamin Peterson2020-03-101-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-052-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
* Improve grammar in the import system reference documentation (GH-18209)Bonifacio de Oliveira2020-01-291-1/+1
| | | | | Replaced the period with a comma. Automerge-Triggered-By: @Mariatta
* bpo-15243: Document __prepare__ as classmethod (GH-17124)alclarks2020-01-251-1/+2
|
* bpo-39048: Look up __aenter__ before __aexit__ in async with (GH-17609)Géry Ogam2020-01-141-1/+1
| | | | | | * Reorder the __aenter__ and __aexit__ checks for async with * Add assertions for async with body being skipped * Swap __aexit__ and __aenter__ loading in the documentation
* Fix the parameter list of object. _rpow_ (#GH-16477)HongWeipeng2020-01-051-1/+1
|