Commit graph

848 commits

Author SHA1 Message Date
Miss Islington (bot)
1851443157
[3.10] [3.11] Add single value agen.athrow(value) signature to the 3.11 docs gh-105269 (GH-105468) (#105480)
(cherry picked from commit acf3916e84)

Co-authored-by: Federico Caselli <CaselIT@users.noreply.github.com>
2023-07-05 13:18:39 +02:00
Miss Islington (bot)
2c015a674d
gh-100315: clarification to __slots__ docs. (GH-102621)
refer to tp_itemsize in discussion on "variable-length" built-in types
(cherry picked from commit 88c262c086)

Co-authored-by: T <tnie@tuta.io>
2023-03-14 02:30:28 -07:00
Alex Waygood
83ccaf2c09
[3.10] Fix duplicated words in the docs (#102645)
(cherry-picked from commit f6ca71a)

With grep utility found some duplicated words

Co-authored-by: Виталий Дмитриев <vitaldmit@bk.ru>
2023-03-13 14:31:25 +00:00
Miss Islington (bot)
bc3718eb4b
GH-101898: Fix missing term references for hashable definition (GH-101899)
Fix missing term references for hashable definition
(cherry picked from commit 3690688149)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2023-02-14 02:47:49 -08:00
Miss Islington (bot)
fee4059d21
[3.10] gh-81611: Improve range paragraph in 8.3 of language reference (GH-98353) (#100705)
gh-81611: Improve `range` paragraph in 8.3 of language reference (GH-98353)
(cherry picked from commit 8b1f125121)

Co-authored-by: 4l4k4z4m <alakazamjoined@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-01-04 16:00:27 -05:00
Miss Islington (bot)
a63949374b
fix grammer -> grammar typo in expressions.rst (GH-100683)
(cherry picked from commit 7feb6d2f85)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Automerge-Triggered-By: GH:AlexWaygood
2023-01-02 03:57:22 -08:00
Miss Islington (bot)
fd108e5439
gh-100201: Document behavior with a bare yield statement (GH-100416)
(cherry picked from commit 1aab269d4a)

Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-01-01 07:42:31 -08:00
Miss Islington (bot)
504aa92b70
GH-85979: Clarify specification of object.__await__ (GH-22320)
(cherry picked from commit f59c7f8edd)

Co-authored-by: Paolo Lammens <lammenspaolo@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-12-30 22:31:41 -08:00
Miss Islington (bot)
86cdfaa885
gh-48496: Added example and link to faq for UnboundLocalError in reference (GH-93068)
(cherry picked from commit f3db68e6e6)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-12-22 15:30:09 -08:00
Miss Islington (bot)
0f61020255
"Compound statement" docs: Fix with-statement step indexing (GH-100286)
Back in commit 226e6e7d43
an item was added to the list, renumbering all the rest of the
items, but the forward-reference wasn't updated to match.
(cherry picked from commit f23236a92d)

Co-authored-by: Frank Dana <ferdnyc@gmail.com>
2022-12-16 11:02:41 -08:00
Miss Islington (bot)
fae745ed14
Fix typo in __match_args__ doc (GH-99785)
A opy of GH-98549, whose author (@icecream17) uses a school computer that blocks the CLA site. I did not mention this in commit comment above so CLA bot does not pick up the name and request the CLA again.
(cherry picked from commit a86d854522)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-11-25 16:11:48 -08:00
Miss Islington (bot)
6b46cb4d33
doc: Formatting and typo fixes (GH-98974)
(cherry picked from commit 728e42fcf5)

Co-authored-by: jmcb <joelsgp@protonmail.com>
2022-11-07 09:14:28 -08:00
Miss Islington (bot)
8c0cf111a0
Docs: Add 'as, match statement' to the index (GH-99001)
(cherry picked from commit 26720fffd0)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-11-02 19:23:22 -07:00
Stanley
f786485f13
[3.10] Change links to label refs (GH-98454) (#98726)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-26 13:19:39 -07:00
C.A.M. Gerlach
b2db1c2080
[3.10] Docs: Fix backtick errors found by sphinx-lint (GH-97998) (#98373)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>.
(cherry picked from commit fa2d43e518)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-10-18 01:49:47 +02:00
Miss Islington (bot)
a2ce21f763
gh-97913 Docs: Add walrus operator to the index (GH-97921)
* Add walrus operator to the index

* Add named expression to the index

Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>

* Fix indentation and add missing newline

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 296313002f)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-10-08 00:03:33 -07:00
Miss Islington (bot)
bc03bf42e7
gh-97850: Remove the open issues section from the import reference (GH-97935)
Remove the open issues section from the import reference

Tracking in https://github.com/python/cpython/issues/97850 instead.
(cherry picked from commit f8edc6ff53)

Co-authored-by: Brett Cannon <brett@python.org>
2022-10-06 14:07:34 -07:00
Miss Islington (bot)
b7487dff30
gh-86482: Document assignment expression need for ()s (GH-23291)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 2b5f1360ea)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-10-06 12:33:23 -07:00
Łukasz Langa
3b0f2a7ff0
[3.10] gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (GH-97768) (#97925)
:c:type:`<C type>` -> :c:expr:`<C type>`

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 0031e62973)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-10-05 14:10:55 -07:00
Miss Islington (bot)
8a2afd295b
gh-96397: Document that keywords in calls need not be identifiers (GH-96393)
This represents the official SC stance, see
https://github.com/python/steering-council/issues/142GH-issuecomment-1252172695
(cherry picked from commit 9d432b4a18)

Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
2022-09-22 11:17:30 -07:00
Miss Islington (bot)
b6fb779489
GH-96359: Fix docs that claim int(0|1) doesn't match False (GH-96361)
(cherry picked from commit 3d3a86ed40)

Co-authored-by: Jonathan Oberländer <github@l3vi.de>
2022-08-29 00:14:33 -07:00
Ezio Melotti
f51c232ec8
[3.10] gh-95994: Clarify escaped newlines. (GH-96066) (#96360)
* gh-95994: clarify escaped newlines.

* Rephrase ambiguous sentence.

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>

* Use `<newline>` in escape sequences table.

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit c3d591fd06)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-08-28 15:17:01 +02:00
Serhiy Storchaka
54d4b4d992
[3.10] gh-91838: Use HTTPS links in docs for resources which redirect to HTTPS (GH-95527) (GH-95644)
If an HTTP link is redirected to a same looking HTTPS link, the latter can
be used directly without changes in readability and behavior.
It protects from a men-in-the-middle attack.

This change does not affect Python examples..
(cherry picked from commit f79547a429)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-08-04 12:19:44 +03:00
Miss Islington (bot)
665e5585f4
Fix async method reference links in compound_stmts docs (GH-94935)
(cherry picked from commit 79d2f549ad)

Co-authored-by: July Tikhonov <july.tikh@gmail.com>
2022-07-22 10:11:25 -07:00
Łukasz Langa
6e47020d31
[3.10] Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551) (GH-94558)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
(cherry picked from commit 3440d197a5)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2022-07-05 14:30:37 +02:00
Łukasz Langa
9ab245f8ca
[3.10] gh-93675: Fix typos in Doc/ (GH-93676) (GH-94080)
Closes GH-93675
(cherry picked from commit 830513754d)

Co-authored-by: luzpaz <luzpaz@users.noreply.github.com>
2022-06-21 21:39:08 +02:00
Miss Islington (bot)
fb566cacb3
bpo-45393: help() on operator precedence has misleading entries (GH-31246) (GH-92966)
(cherry picked from commit fb082c2fc5)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2022-05-19 17:32:54 +02:00
Miss Islington (bot)
006b302beb
gh-80143: Add clarification for escape characters (GH-92292) (GH-92629)
(cherry picked from commit 549567c6e7)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-05-16 18:54:40 +02:00
Miss Islington (bot)
666820cb4b
gh-87304: Improve comments in language reference for imports (GH-92164)
(cherry picked from commit ee2205b208)

Co-authored-by: Robert Yang <35813883+robert861212@users.noreply.github.com>
2022-05-03 15:24:03 -07:00
Miss Islington (bot)
531f66ad62
gh-89885: Improve import example in language reference (GH-91523)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit d5a69571f5)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-17 14:34:41 -07:00
Miss Islington (bot)
a5c90784be
Language reference: Remove duplicated text about iterable unpacking (GH-25212)
(cherry picked from commit 4f5d56f8f3)

Co-authored-by: Jiashuo Li <4003950+jiasli@users.noreply.github.com>
2022-04-02 20:05:11 -07:00
Miss Islington (bot)
ce6af314ca
bpo-24563: Link encoding names to encoding declarations (GH-32274)
(cherry picked from commit 01be5d6446)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-04-02 17:40:55 -07:00
Miss Islington (bot)
625f6704c0
bpo-14911: Corrected generator.throw() documentation (GH-32207)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 8be7c2bc5a)

Co-authored-by: Dave Goncalves <davegoncalves@gmail.com>
2022-03-31 07:23:04 -07:00
Irit Katriel
7fc12540e3
bpo-12029: [doc] clarify that except does not match virtual subclasses of the specified exception type (GH-32027) (GH-32034)
(cherry picked from commit 45833b50f0)
2022-03-21 21:22:39 +00:00
Miss Islington (bot)
87b3e202d4
bpo-46013: Fix confusing kerning on period in docs (GH-29989) (GH-32005)
(cherry picked from commit 3af68fc77c)

Co-authored-by: jmcb <joel.mcbride1@live.com>

Co-authored-by: jmcb <joel.mcbride1@live.com>
2022-03-20 12:17:19 +00:00
Miss Islington (bot)
ef54c4df82
Removed confusing reference to sys (GH-31638)
(cherry picked from commit 28f84c72b6)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
2022-03-08 08:04:56 -08:00
Miss Islington (bot)
b099363fa7
Removed ambiguity in __init_subclass__ docs (GH-31540)
(cherry picked from commit ab014978ae)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
2022-03-07 20:33:19 -08:00
Miss Islington (bot)
06108c08dd
bpo-45680: Improve docs on subscriptions w.r.t. GenericAlias objects (GH-29479)
(cherry picked from commit 50731297a9)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-03-07 20:12:59 -08:00
Miss Islington (bot)
2572c670d4
[3.10] bpo-23556: [doc] Fix inaccuracy in documentation for raise without args. Improve tests for context in nested except handlers. (GH-29236) (GH-30953)
(cherry picked from commit 08c0ed2d9c)


Co-authored-by: Kinshuk Dua <kinshukdua@gmail.com>

Automerge-Triggered-By: GH:iritkatriel
2022-01-27 02:51:06 -08:00
Miss Islington (bot)
75a1865d1c
[3.10] bpo-24650: Use full term "generator function" in yield expressions docs (GH-24663) (GH-30461)
(cherry picked from commit 273cb8e757)


Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>

Automerge-Triggered-By: GH:iritkatriel
2022-01-07 11:01:33 -08:00
Miss Islington (bot)
e9783d6434
bpo-46095: Improve SeqIter documentation. (GH-30316) (GH-30330) 2022-01-01 11:12:43 -08:00
Miss Islington (bot)
d7537ac8e3
bpo-46076: Improve documentation for per-attribute docstrings with __slots__ (GH-30109) (GH-30206) 2021-12-19 15:11:12 -06:00
Alex Waygood
7da90251ae
bpo-45840: Improve cross-references in the data model documentation (GH-29633) (GH-30077)
(cherry picked from commit c0521fe49f)
2021-12-13 11:20:21 +02:00
Miss Islington (bot)
4b224e8729
[doc] Clarify MRO precedence in descriptor super binding section (GH-29539) (GH-29669)
A similar sentence is present in the 'Invocation from super' section of
the descriptor HOWTO, where it is already correct.
(cherry picked from commit ee49484c0f)

Co-authored-by: Jouke Witteveen <j.witteveen@gmail.com>
2021-12-11 01:01:16 +01:00
Miss Islington (bot)
7842aed7a7
bpo-45619: documentation of execution model: clarify and update binding summary (GH-29232)
This does two changes that are quite related.

0. it add that variable binding can occur in pattern matching, an update of 3.10
which seems to have been omitted from the list of bindings
1. Given how long the sentence already was, with even subcases in the middle of
the sentence, the commit breaks the sentence into an actual list.
(cherry picked from commit cd876c8493)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
2021-11-25 21:36:37 -08:00
Brett Cannon
99aad31b7a
[3.10] bpo-45250: fix docs regarding __iter__ and iterators being inconsistently required by CPython (GH-29170) (GH-29650)
It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
(cherry picked from commit be36e06340)

Co-authored-by: Brett Cannon <brett@python.org>
2021-11-22 15:09:15 -08:00
Miss Islington (bot)
fde9f61e70
[3.10] [doc] bpo-45680: Disambiguate `__getitem__ and __class_getitem__` in the data model (GH-29389) (GH-29620)
The documentation explaining Python's data model does not adequately explain
the differences between ``__getitem__`` and ``__class_getitem__``, nor does it
explain when each is called. There is an attempt at explaining
``__class_getitem__`` in the documentation for ``GenericAlias`` objects, but
this does not give sufficient clarity into how the method works. Moreover, it
is the wrong place for that information to be found; the explanation of
``__class_getitem__`` should be in the documentation explaining the data model.

This PR has been split off from GH-29335.
(cherry picked from commit 31b3a70edb)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-18 18:34:08 +01:00
Miss Islington (bot)
252d83cbf1
bpo-45640: [docs] Tokens are now clickable (GH-29260) (GH-29621)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 32959108f9)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
2021-11-18 17:28:39 +01:00
Miss Islington (bot)
fef54abf5f
bpo-45583: Correct datamodel documentation of int() (GH-29182) (GH-29285)
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 d9c1868c25)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
2021-10-28 22:17:06 +02:00
Miss Islington (bot)
855d6247ad
[3.10]bpo-45463: Clarify that global statements allows multiple names (GH-28851) (GH-28989)
The global statement allows specifying a list of identifiers
(https://docs.python.org/3/reference/simple_stmts.htmlGH-the-global-statement).

The "Execution model" chapter described the global statement as if it
only allowed one single name. Pluralize "name" in the appropriate places.
(cherry picked from commit 4ecd119b00)

Co-authored-by: Luca Chiodini <luca@chiodini.org>

Co-authored-by: Luca Chiodini <luca@chiodini.org>
2021-10-16 10:01:54 -04:00