Commit Graph

884 Commits

Author SHA1 Message Date
Ken Jin 53c91ac525
bpo-43977: Update pattern matching language reference docs (GH-25917)
* Update patma language reference with new changes to sequence and mapping

* update 3.10 whatsnew too
2021-05-13 22:31:28 -07:00
Terry Jan Reedy 3b200b2aa6
bpo-44025: Clarify when '_' is a keyword. (#25873)
In match statements, in case patterns and nowhere else.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-05-04 11:00:29 +02:00
Zackery Spytz 7d2b83e9f0
bpo-43990: Fix the footnote ordering in the operator precedence docs (GH-25805)
Footnotes 5 and 6 were in the wrong order.
2021-05-02 10:29:15 -07:00
larryhastings 49b26fa517
bpo-43987: Add "Annotations Best Practices" HOWTO doc. (#25746)
Add "Annotations Best Practices" HOWTO doc.
2021-05-01 21:19:24 -07:00
Ryan Hileman 9a2c2a9ec3
bpo-42800: add audit hooks for f_code and tb_frame (GH-24182)
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
Add an AUDIT_READ attribute flag aliased to READ_RESTRICTED.
Update obsolete flag documentation.
2021-04-30 00:15:55 +01:00
Géry Ogam a1a5e3c4c8
Fix a typo in datamodel reference document (GH-24930) 2021-04-25 14:13:19 -07:00
Pablo Galindo b0544ba77c
bpo-38605: Revert making 'from __future__ import annotations' the default (GH-25490)
This reverts commits 044a1048ca and 1be456ae9d, adapting the code to changes that happened after it.
2021-04-21 12:41:19 +01:00
Ammar Askar 68ba0c67ca
bpo-43837: Reverse order of precedence table to show tightly binding operators first (GH-25469) 2021-04-19 08:22:03 -07:00
Ken Jin 37a5e22023
Use double quotes over single quotes for match statement grammar (GH-24943) 2021-04-12 10:03:20 -07:00
Victor Stinner 553ee2781a
bpo-43682: Make staticmethod objects callable (GH-25117)
Static methods (@staticmethod) are now callable as regular functions.
2021-04-12 00:21:22 +02:00
Mark Dickinson 79650d0118
Fix description of behaviour of an exception class in 'from' clause (GH-24303) 2021-04-11 09:33:59 +01:00
Saiyang Gou 1e051a21b7
bpo-39702: Remove dotted_name from decorator documentation (GH-25234) 2021-04-08 15:34:09 -07:00
Saiyang Gou 58d72cab89
bpo-36540: Improve doc of function definition regarding positional-only arguments (GH-25235) 2021-04-07 20:06:43 +01:00
Saiyang Gou 1be456ae9d
bpo-38605: Update "Future statements" docs since PEP 563 is always enabled (GH-25236)
Update documentation section for "Future statements" to reflect that `from __future__ import annotations` is on by default, and no features require using the future statement now.
2021-04-06 22:02:20 -07:00
Saiyang Gou 0fdf11e8e9
bpo-43755: Update docs to reflect that lambda is not allowed in `comp_if` since 3.9 (GH-25231) 2021-04-06 23:15:37 +01:00
Ken Jin 5143fd15b4
Update pattern matching docs for changes to the PEP (#25185)
See:
- https://github.com/python/peps/pull/1909 (__match_args__ must be a tuple)
- https://github.com/python/peps/pull/1908 (allow keyword patterns for int(x) etc.)
2021-04-06 09:03:00 -07:00
Brett Cannon f97dc80068
bpo-43672: raise ImportWarning when calling find_loader() (GH-25119) 2021-04-02 12:35:32 -07:00
Brett Cannon a7ff6df60c
bpo-42134: Raise ImportWarning when calling find_module() in the import system (GH-25044) 2021-03-30 08:43:03 -07:00
Brett Cannon 1899087b21
bpo-42136: Deprecate module_repr() as found in importlib (GH-25022) 2021-03-26 11:55:07 -07:00
Daniel F Moisset a22bca6b1e
bpo-42128: Add documentation for pattern matching (PEP 634) (#24664)
This is a first edition, ready to go out with the implementation. We'll iterate during the rest of the period leading up to 3.10.0.

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandt@python.org>
Co-authored-by: Raymond Hettinger <1623689+rhettinger@users.noreply.github.com>
Co-authored-by: Guido van Rossum <guido@python.org>
2021-02-28 20:08:38 -08:00
Terry Jan Reedy 2f9ef514fb
bpo-27646: Say that 'yield from' expression can be any iterable (GH-24595)
Previously, the doc at least strongly implied that it had to be an iterator.
2021-02-20 21:33:25 -05:00
Ken Jin 2edaf6a4fb
bpo-8264: Document hasattr and getattr behavior for private attributes (GH-23513)
Clarify ``getattr`` and ``setattr`` requirements for accessing name-mangled attributes

Co-Authored-By: Catalin Iacob <iacobcatalin@gmail.com>
2021-02-02 13:06:57 -08:00
Pablo Galindo 7c8e0b0336
Document new parenthesized with statements (GH-24281) 2021-01-25 23:15:51 +00:00
Géry Ogam d515c610c6
bpo-35790: Correct the description of sys.exc_info() and add a code example (GH-11625) 2020-12-21 14:13:08 +01:00
Colin Watson c95f8bc270
bpo-42669: Document that `except` rejects nested tuples (GH-23822)
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
2020-12-20 10:24:10 -08:00
Andre Delfino c56f9df049
[doc] Mention with and except clauses in globals() (GH-13232) 2020-12-19 16:48:06 +01:00
Andre Delfino 96a09df644
[doc] Fix a few margins due to bad markup (GH-23619) 2020-12-17 09:25:55 -08:00
Nick Gaya 4b8cdfcb22
bpo-41879: Doc: Fix description of async for statement (GH-23548)
Fix the wording in the documentation of `async for` to correctly describe asynchronous iterables.  This fix is relevant for version 3.7 onward.
2020-12-11 00:27:35 -08:00
James Gerity bcc9579227
bpo-42485: [Doc] Link to PEP 617 from full grammar specification (GH-23532)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2020-11-30 19:08:26 +00:00
Joongi Kim 6e8dcdaaa4
bpo-41229: Update docs for explicit aclose()-required cases and add 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.
2020-11-02 00:02:48 -08:00
kj 9129af6050
bpo-42198: Link to GenericAlias in typing and expressions (GH-23030)
Follow up to 7cdf30fff3 and 4173320920. This addresses the point "1. Update links in typing, subscription and union to point to GenericAlias." in the bpo for this PR.
2020-10-29 21:01:17 -07:00
Andre Delfino 95f710c557
bpo-6761: Enhance __call__ documentation (GH-7987) 2020-10-27 17:18:57 +01:00
Brett Cannon 3c69f0c933
bpo-41910: specify the default implementations of object.__eq__ and object.__ne__ (GH-22874)
See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython.

Automerge-Triggered-By: GH:brettcannon
2020-10-21 16:24:38 -07:00
Géry Ogam 27f1bd8787
bpo-35181: Correct importlib documentation for some module attributes (GH-15190)
@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
2020-10-21 14:17:35 -07:00
kpinc f8b1ccd63c
Fix bpo-39416: Change "Numeric" to lower case; an english word, not a class 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
2020-10-21 13:34:15 -07:00
kpinc c60394c7fc
bpo-39416: Document some restrictions on the default string representations 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/
2020-10-21 10:13:50 -07:00
Zackery Spytz cb115e36e1
Doc: Fix a typo/error in the docs for cached bytecode (GH-22445) 2020-10-21 17:36:03 +09:00
Andre Delfino eba109a28f
Doc: Remove old Python version from future stmt (GH-21802) 2020-10-21 14:45:13 +09:00
kj 7cdf30fff3
bpo-42010: [docs] Clarify subscription of types (GH-22822) 2020-10-20 16:38:08 -07:00
Florian Dahlitz 2d55aa9e37
bpo-29981: Add examples and update index for set, dict, and generator comprehensions'(GH-20272)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2020-10-20 17:27:07 -04:00
Saiyang Gou 3f7e990fd4
bpo-41192: Add documentation of undocumented audit events (GH-21308) 2020-10-20 15:23:15 -04:00
Andre Delfino 8adf8d1ec4
[doc] Remove mention of async and await as soft keywords (GH-22144) 2020-10-12 14:52:30 +01:00
Batuhan Taskaya 044a1048ca
bpo-38605: Make 'from __future__ import annotations' the default (GH-20434)
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).
2020-10-06 13:03:02 -07:00
Brett Cannon d02d824e05
bpo-41584: clarify when the reflected method of a binary arithemtic operator is called (#22505) 2020-10-05 09:42:21 -07:00
Victor Stinner 8af239eacf
bpo-41762: Fix usage of productionlist markup in the doc (GH-22281)
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".
2020-09-18 09:10:15 +02:00
Andre Delfino 788b79fa7b
[doc] Remove superfluous comment about equal in f-strings (GH-22006)
Automerge-Triggered-By: @kushaldas
2020-09-09 23:33:13 -07:00
Victor Stinner 1abeda80f7
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
2020-08-17 08:41:42 +02:00
Victor Stinner bb0b08540c
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.
2020-08-14 12:20:05 +02:00
amaajemyfren 13efaec2e0
bpo-41045: Document debug feature of f-strings ('=') (GH-21509)
Co-Authored-By: Rishi <rishi93dev@gmail.com>

Automerge-Triggered-By: @gvanrossum
2020-07-27 15:31:02 -07:00
Pablo Galindo 72cabb2aa6
bpo-40939: Use the new grammar for the grammar specification documentation (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>
2020-07-27 11:20:36 -07:00
Shankar Jha f117cef25b
bpo-39868: Add documentation for Assignment Expressions (walrus, PEP 572) (#18851) 2020-07-25 16:33:48 -07:00
Andre Delfino b9f6ac9d46
Stick with the phrase "default parameter value" (GH-21590) 2020-07-22 20:58:19 -03:00
Géry Ogam e2fb8a2c42
Update lexical_analysis.rst (GH-17508)
Use Sphinx role markup for `str.format`.

Automerge-Triggered-By: @csabella
2020-06-12 05:54:29 -07:00
Matteo Bertucci af23f0d3cf
bpo-40439: Update broken link in lexical analysis docs (GH-20184)
Automerge-Triggered-By: @csabella
2020-05-22 18:12:09 -07:00
Heshy Roskes ef33712baa
Fix typo in object.__format__ docs (GH-19504) 2020-04-25 21:57:09 -04:00
Mark Dickinson 810f68f128
Fix misinformation about NaN != NaN comparison (GH-19357) 2020-04-05 10:25:24 +01:00
Mathieu Dupuy c49016e67c
fix comma location in various places (GH-19233) 2020-03-30 14:28:25 -07:00
Javad Mokhtari 5f9c131c09
bpo-40045: Make "dunder" method documentation easier to locate (#19153)
* issue 40045

* Update lexical_analysis.rst

Make "dunder" method documentation easier(GH-19153)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2020-03-27 16:02:51 -03:00
Lahfa Samy 59c644eaa7
bpo-39879: Update datamodel docs to include dict ordering (GH-19006)
Co-authored-by: furkanonder <furkantahaonder@gmail.com>
2020-03-26 09:54:04 -05:00
Benjamin Peterson 51796e5d26
Update some www.unicode.org URLs to use HTTPS. (GH-18912) 2020-03-10 21:10:59 -07:00
Benjamin Peterson 051b9d08d1
closes bpo-39926: Update Unicode to 13.0.0. (GH-18910) 2020-03-10 20:41:34 -07:00
Brandt Bucher 8f13053692
bpo-39702: Update the Language Reference (PEP 614) (GH-18802) 2020-03-07 10:23:49 -08:00
Caleb Donovick e59334ebc9
bpo-17422: slightly more precise language (GH-18682) 2020-03-06 10:20:48 -08:00
Brandt Bucher 8bae21962b
bpo-39868: Update Language Reference for PEP 572. (#18793) 2020-03-05 21:19:22 -08:00
MojoVampire 469325c30e
bpo-35712: Make using NotImplemented in a boolean context issue a deprecation warning (GH-13195) 2020-03-03 20:50:17 +02:00
ananthan-123 fbe2e0bb8a
bpo-17422: Language reference should specify restrictions on class namespace (#18559)
The language reference now specifies restrictions on class namespaces.  Adapted from a patch by Ethan Furman.
2020-02-22 09:56:01 -08:00
Serhiy Storchaka f632736023
bpo-39545: Document changes in the support of await in f-strings. (GH-18456)
https://bugs.python.org/issue39545
2020-02-13 15:57:35 -08:00
Bonifacio de Oliveira d47d0c8e9f
Improve grammar in the import system reference documentation (GH-18209)
Replaced the period with a comma.

Automerge-Triggered-By: @Mariatta
2020-01-29 18:23:50 -08:00
alclarks 7de617455e bpo-15243: Document __prepare__ as classmethod (GH-17124) 2020-01-25 21:49:58 +03:00
Géry Ogam 1d1b97ae64 bpo-39048: Look up __aenter__ before __aexit__ in async with (GH-17609)
* 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
2020-01-14 21:58:29 +10:00
HongWeipeng abc0c4fa99 Fix the parameter list of object. _rpow_ (#GH-16477) 2020-01-05 17:20:29 -05:00
Géry Ogam 226e6e7d43 bpo-39037: Fix lookup order of magic methods in with statement documentation (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.
2019-12-30 15:24:51 +10:00
Oleg Höfling cbd0408b54 links in importlib.metadata.rst replaced with sphinx references (GH-17730)
The importlib.metadata documentation uses hardcoded links to internal
pages. This results in minor rendering issues. This change replaces
the hardcoded links with suitable Sphinx roles.

Signed-off-by: Oleg Höfling <oleg.hoefling@gmail.com>
2019-12-29 12:26:35 -05:00
Batuhan Taşkaya d587272fe3 bpo-38316: Fix co_stacksize documentation (GH-16983) 2019-12-15 23:02:47 +01:00
Tal Einat 02519f75d1
bpo-38524: clarify example a bit and improve formatting (GH-17406) 2019-11-28 07:22:09 +02:00
Florian Dahlitz 1bddf890e5 bpo-38524: document implicit and explicit calling of descriptors' __set_name__ (GH-17364) 2019-11-27 10:46:40 +02:00
alclarks 4544e78ec4 bpo-25866: Minor cleanups to "sequence" in docs (GH-17177) 2019-11-17 14:00:43 -08:00
Shu 2d56af7a94 Fix minor typos. (GH-17095) 2019-11-12 19:12:11 -08:00
Shu fc6b1bf869 Clarify amount of dots between package and subpackage (GH-17092) 2019-11-08 12:26:35 -08:00
Géry Ogam 4c155f738d bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520) 2019-10-29 00:04:01 -07:00
Steve Dower 894e30ce0b
bpo-38434: Fixes some audit event documentation (GH-16932) 2019-10-26 13:02:30 -07:00
Julien Palard a45b0efdea Doc: Add -m reference in context of code execution (GH-16045) 2019-09-12 14:19:06 +01:00
Emily Morehouse 6357c95716 bpo-35224: Additional documentation for Assignment Expressions (GH-15935)
Add or update assignment expression documentation for:
- FAQ - Design
- Reference - Expressions
- Reference - Lexical Analysis


https://bugs.python.org/issue35224



Automerge-Triggered-By: @matrixise
2019-09-11 07:37:12 -07:00
Andre Delfino dc26997109 bpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760)
https://bugs.python.org/issue33459



Automerge-Triggered-By: @matrixise
2019-09-11 06:16:11 -07:00
Steve Dower a39a4c7439
bpo-37913: Link to NotImplemented from new docs (GH-15860) 2019-09-10 15:25:12 +01:00
Jeroen Demeyer 009ef2955d bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383) 2019-09-10 15:01:13 +01:00
Raymond Hettinger 0dac68f1e5
bpo-36743: __get__ is sometimes called without the owner argument (#12992) 2019-08-29 01:27:42 -07:00
Joannah Nanjekye 6b16d938d6 bpo-15542: Documentation incorrectly suggests __init__ called after direct __new__ call (GH-15478) 2019-08-25 23:53:11 -07:00
Raymond Hettinger edd21129dd
bpo-32118: Simplify docs for sequence comparison (GH-15450) 2019-08-24 10:43:55 -07:00
Serhiy Storchaka e9c90aa431
bpo-29535: Remove promize about hash randomization of datetime objects. (GH-15269) 2019-08-24 12:49:27 +03:00
Gregory P. Smith b4be87a04a bpo-32912: Revert SyntaxWarning on invalid escape sequences. (GH-15195)
DeprecationWarning will continue to be emitted for invalid escape
sequences in string and bytes literals just as it did in 3.7.

SyntaxWarning may be emitted in the future. But per mailing list
discussion, we don't yet know when because we haven't settled on how to
do so in a non-disruptive manner.

(Applies 4c5b6bac24 to the master branch).
(This is https://github.com/python/cpython/pull/15142 for master/3.9)


https://bugs.python.org/issue32912



Automerge-Triggered-By: @gpshead
2019-08-10 00:19:07 -07:00
Jörn Heissler c8a35417db bpo-35224: Reverse evaluation order of key: value in dict comprehensions (GH-14139)
… as proposed in PEP 572; key is now evaluated before value.





https://bugs.python.org/issue35224
2019-06-22 07:40:55 -07:00
Ivan Levkivskyi 8bcf2629a2
More updates to the annotated assignments docs (GH-13794) 2019-06-04 11:37:46 +01:00
Ivan Levkivskyi 82eac26a73
Update the annotated assignment docs (GH-13757) 2019-06-03 00:41:00 +01:00
Serhiy Storchaka bdbad71b9d
bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108) 2019-06-02 00:05:48 +03:00
Pablo Galindo cd74e66a8c
bpo-37122: Make co->co_argcount represent the total number of positonal arguments in the code object (GH-13726) 2019-06-01 18:08:04 +01:00
Serhiy Storchaka 70c5f2ae6e
Use more PEP 570 syntax in the documentation. (GH-13720) 2019-06-01 11:38:24 +03:00
Pablo Galindo ed222a74a0
Update data model docs to include missing attributes for code objects (GH-13696)
Include and document co_posonlyargcount and co_kwonlyargcount
2019-05-31 12:13:04 +01:00
Antti Haapala 2f5b9dcc0a bpo-30969: Fix docs about the comparison in absence of __contains__ (GH-2761) 2019-05-30 16:19:28 -04:00
Pablo Galindo 29cb21ddb9
Regenerate topics file (GH-13642) 2019-05-29 22:59:00 +01:00
Pablo Galindo b76302ddd0 bpo-36540: Documentation for PEP570 - Python positional only arguments (#13202)
* bpo-36540: Documentation for PEP570 - Python positional only arguments

* fixup! bpo-36540: Documentation for PEP570 - Python positional only arguments

* Update reference for compound statements

* Apply suggestions from Carol

Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>

* Update Doc/tutorial/controlflow.rst

Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>

* Add extra bullet point and minor edits
2019-05-28 16:45:32 -07:00
divyag9 778a910758 bpo-34682: Wording and grammatical changes to the doc(https://docs.python.org/3) (GH-13120)
https://bugs.python.org/issue34682
2019-05-13 06:05:20 -07:00
Johnny Gérard 4ef9b8e505 Correct misspelling (GH-11470) 2019-05-12 23:39:32 -04:00
Benjamin Peterson 3aca40d3cb
closes bpo-36861: Update Unicode database to 12.1.0. (GH-13214)
Adds ㋿.
2019-05-08 20:59:35 -07:00
Logan Jones ae2c32f32b bpo-36798: Updating f-string docs for := use case (GH-13107) 2019-05-06 11:32:44 -05:00
Catherine Alvarado 5e98f05e55 bpo-36166: Change to rst datamodel file. (GH-13089) 2019-05-04 17:54:35 -04:00
Andre Delfino a8a79cacca Improve grammar on async context managers and shorten text (GH-12379) 2019-05-03 08:08:10 -07:00
Andre Delfino 5861cddf76 Don't use the LHS/RHS acronym in Simple statements (GH-12996)
Prefer the full wording instead, as it is more meaningful for someone not familiar with the terms.

Also, LFS/RHS is not used anywhere else in the documentation, while left/right-hand side mentions are common.
2019-05-03 07:59:05 -07:00
Géry Ogam ee88af3f4f Namespace packages _bootstrap.ModuleSpec.loader attributes are no longer None (#10376)
Namespace packages _bootstrap.ModuleSpec.loader attributes are no longer `None` _after_ calling the importlib._bootstrap._init_module_attrs function.

See:
* https://stackoverflow.com/questions/52869541/namespace-package-spec-loader-and-loader-attributes-not-set-to-none
* https://bugs.python.org/issue35181
2019-05-01 13:08:17 -07:00
Joannah Nanjekye 70bf713617 bpo-30840: Document relative imports (#12831)
* document relative imports

* 📜🤖 Added by blurb_it.

* fix indentation error

* remove indentation

* Document relative imports

* Document relative imports

* remove from ...package

* Document relative imports

* remove trailing space

* Document relative imports

* Document relative imports
2019-04-25 01:14:44 +10:00
Jules Lasne (jlasne) 1fc5bf2ff2 Doc: Fixed missing punctuation in datamodel.rst (GH-12581) 2019-03-27 11:10:33 +01:00
Benjamin Peterson 738c19f4c5
closes bpo-33376: Update to Unicode 12.0.0. (GH-12256) 2019-03-09 16:25:55 -08:00
Martijn Pieters b727239575 closes bpo-36188: Clean up 'unbound' method left-overs. (GH-12169)
Methods are always bound, and `__self__` can no longer be `NULL`
(`method_new()` and `PyMethod_New()` both explicitly check for this).

Moreover, once a bound method is bound, it *stays* bound and won't be re-bound
to something else, so the section in the datamodel that talks about accessing
an methods in a different descriptor-binding context doesn't apply any more in
Python 3.
2019-03-04 21:19:34 -08:00
Raymond Hettinger 7463884f69 Document other performance implication for __slots__ (GH-11974) 2019-02-21 03:34:04 -08:00
Pierre Glaser df8d2cde63 bpo-35911: add cell constructor (GH-11771)
Add a cell constructor, expose the cell type in the types module.
2019-02-07 19:36:48 +00:00
Cheryl Sabella b7105c9c96 bpo-35566: Add links to annotation glossary term (GH-11291) 2018-12-23 21:09:09 -08:00
Serhiy Storchaka 2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
Andre Delfino 55f41e45b4 Correct a couple of unbalanced parenthesis. (GH-10779) 2018-12-05 21:45:30 +02:00
Andre Delfino 1ce853f377 Move __missing__ after __delitem__ in Data model. (GH-10923) 2018-12-05 21:42:44 +02:00
wim glenn a48e0eb967 Fix outdated info in datamodel about dicts (GH-9807) 2018-11-16 20:58:19 +09:00
Andrés Delfino c2ccac7b9f bpo-33816: Remove outdated metaclass example (GH-7566) 2018-11-16 20:41:55 +09:00
Julien Palard 082875dcd6
bpo-33878: Doc: Fix missing case by simplifying. (GH-7762)
The documentation was not covering multiple targets enclosed by
parenthesis nor multiple targets enclosed by brackets, adding them all
would be heavy, an else cover them all and is lighter to read.
2018-11-12 00:59:39 +01:00
Andrés Delfino b086c8afdb bpo-33699: Describe try's else clause with the rest of the try clause (GH-7252)
https://bugs.python.org/issue33699
2018-11-11 11:33:51 -08:00
Andrés Delfino bfe1839aa9 Add link to PEP 525 in Expressions. (GH-10333) 2018-11-07 20:12:12 +02:00
Andrés Delfino cdb96f45b6 Add future_stmt to simple_stmt production list. (GH-8239) 2018-11-07 19:32:18 +02:00
Andrés Delfino ea6a28c9f7 Mark -c and -O as command line options in reStructuredText. (GH-10103) 2018-11-07 19:06:45 +02:00
Denis Osipov 0bee3c36d4 bpo-35119: Fix RecursionError in example of customizing module attribute access. (GH-10323)
https://bugs.python.org/issue35119
2018-11-06 01:53:21 +00:00
Serhiy Storchaka 913876d824
bpo-35054: Add yet more index entries for symbols. (GH-10121) 2018-10-28 13:41:26 +02:00
Andrés Delfino 95f68b10d5 Fix mistakes on function coroutines related definitions (GH-9871)
Fix a bug I introduced in #9864 by which coroutines are treated as synonymous of function coroutines.

Also, fix the same mistake (coroutines == function coroutines) already present in other parts of the reference.

I'm very sorry for the hassle.
2018-10-28 03:41:57 -07:00
Serhiy Storchaka ddb961d2ab
bpo-35054: Add more index entries for symbols. (GH-10064) 2018-10-26 09:00:49 +03:00
Andrés Delfino 0f14fc1a7c bpo-33726, doc: Add short descriptions to PEP references in seealso (GH-7294) 2018-10-20 01:31:15 +02:00
Serhiy Storchaka 6543912c90
bpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652)
for invalid escape sequences in string and bytes literals.
2018-10-19 17:42:06 +03:00
Andrés Delfino c8bb467f40 Update compound_stmts.rst (#9864) 2018-10-14 11:18:16 +03:00
Tony Flury ad8a000420 closes bpo-28955: Clarified comparisons between NaN and number in reference documentation (GH-5982)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-09-14 10:48:50 -07:00
Berker Peksag 3c1b590472
Fix HTML formatting in datamodel.rst (GH-8693) 2018-08-06 23:52:49 +03:00
Andrés Delfino 6921ef7bef Use 'for example' instead of 'in other words' in compound statement doc (GH-8401) 2018-07-30 11:44:35 -07:00
Andrés Delfino e42b705188 Fix typo: variables(s) (GH-8482)
Remove extra `(s)` in the documentation of `compound_stmts`.
2018-07-26 16:35:23 +01:00
Andrés Delfino caccca78e4 bpo-33702: Add some missing links in production lists and do a little polish (GH-7259) 2018-07-07 23:24:46 +03:00
Andrés Delfino c9d43c702a bpo-33877: Remove UNIX qualification for running complete programs (GH-7744)
The statement is true for Windows (and macOS) also.
2018-06-22 17:31:03 -04:00
Andrés Delfino 695118600f bpo-33847: Add '@' operator entry to index (GH-7669) 2018-06-15 15:23:00 -04:00
Andrés Delfino 4fddd4e406 bpo-33852: Remove misplaced parentheses around 'list'. (GH-7672)
'expresson list' refers to the grammar term 'expression_list' in the subscription production.
2018-06-15 14:24:25 -04:00
Ammar Askar 0aa17ee6a7 bpo-33766: Document that end of file or string is a newline (GH-7383) 2018-06-09 19:49:39 -04:00
Benjamin Peterson 7c69c1c0fb
update to Unicode 11.0.0 (closes bpo-33778) (GH-7439)
Also, standardize indentation of generated tables.
2018-06-06 20:14:28 -07:00
Zach Mitchell 00818c8ffd Fix typo in datamodel.rst (GH-6964)
This is a simple grammatical fix correcting "...object whose `__self__` attributes is ..." to "...object whose `__self__` attribute is ...".
2018-06-02 07:29:47 -07:00
Andrés Delfino 268cc7c3f8 Fix lambda parameters being refered as arguments (GH-7037) 2018-05-22 07:57:45 +02:00
Serhiy Storchaka f5e7b1999f
bpo-23722: Raise a RuntimeError for absent __classcell__. (GH-6931)
A DeprecationWarning was emitted in Python 3.6-3.7.
2018-05-20 08:48:12 +03:00
Serhiy Storchaka 8ae8e6af37
bpo-23722: Fix docs for future __classcell__ changes. (GH-6999) 2018-05-20 08:13:52 +03:00
Elvis Pranskevichus 63536bd286 bpo-32996: The bulk of What's New in Python 3.7 (GH-6978) 2018-05-19 23:15:06 -04:00
Ivan Levkivskyi bd5f96581b
bpo-32717: Document PEP 560 (GH-6726) 2018-05-08 19:38:41 +01:00
Brett Cannon 441d945eb3
Clarify that __path__ can't be just any value (GH-6554) 2018-04-20 16:32:46 -07:00