Miss Islington (bot)
9eb1e6c692
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:18:02 -07:00
Miss Islington (bot)
ca7e78dc3a
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:13:28 -07:00
Miss Islington (bot)
f0469c7424
gh-95994: Clarify escaped newlines. (GH-96066)
...
* 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-26 12:11:59 -07:00
Serhiy Storchaka
d8df7e0207
[3.11] gh-91838: Use HTTPS links in docs for resources which redirect to HTTPS (GH-95527) (GH-95643)
...
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 11:45:03 +03:00
Miss Islington (bot)
e99496e1c2
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:13:02 -07:00
Miss Islington (bot)
ccbf85382c
gh-91181: drop support for bytes on sys.path (GH-31934)
...
Support for bytes broke sometime between Python 3.2 and 3.6 and has been broken ever since. Trying to bring back supports is surprisingly difficult in the face of -b and checking for keys in sys.path_importer_cache. Since the support was broken for so long, trying to overcome the difficulty of bringing back the support has been deemed not worth it.
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit 6da988a46c
)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-07-16 18:31:25 -07:00
Miss Islington (bot)
77bf973930
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551) (GH-94557)
...
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:19 +02:00
Łukasz Langa
49687b0054
[3.11] gh-93675: Fix typos in `Doc/` (GH-93676) (GH-94079)
...
Closes GH-93675
(cherry picked from commit 830513754d
)
Co-authored-by: luzpaz <luzpaz@users.noreply.github.com>
2022-06-21 21:22:27 +02:00
Miss Islington (bot)
4d1e243fca
bpo-45393: help() on operator precedence has misleading entries (GH-31246) (GH-92965)
...
(cherry picked from commit fb082c2fc5
)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2022-05-19 17:40:49 +02:00
Robert Yang
ee2205b208
gh-87304: Improve comments in language reference for imports ( #92164 )
2022-05-03 16:08:05 -06:00
Serhiy Storchaka
3483299a24
gh-81548: Deprecate octal escape sequences with value larger than 0o377 (GH-91668)
2022-04-30 13:16:27 +03:00
slateny
b87f7f2c21
bpo-21761: Clarify __file__/__cached__ in import reference (GH-31565)
...
Automerge-Triggered-By: GH:brettcannon
2022-04-26 12:12:02 -07:00
slateny
d5a69571f5
gh-89885: Improve import example in language reference ( #91523 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-17 14:20:13 -07:00
Jiashuo Li
4f5d56f8f3
Language reference: Remove duplicated text about iterable unpacking (GH-25212)
2022-04-02 19:41:16 -07:00
Michał D
281f980d35
bpo-46033: Clarify for-statement execution (GH-30025)
...
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-04-02 20:52:20 -04:00
Terry Jan Reedy
01be5d6446
bpo-24563: Link encoding names to encoding declarations (GH-32274)
2022-04-02 20:13:37 -04:00
Dave Goncalves
8be7c2bc5a
bpo-14911: Corrected generator.throw() documentation (GH-32207)
...
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-03-31 16:56:48 +03:00
Irit Katriel
45833b50f0
bpo-12029: [doc] clarify that except does not match virtual subclasses of the specified exception type (GH-32027)
2022-03-21 20:41:35 +00:00
jmcb
3af68fc77c
bpo-46013: Fix confusing kerning on period in docs (GH-29989)
2022-03-20 09:58:13 +00:00
David Gilbertson
28f84c72b6
Removed confusing reference to sys (GH-31638)
2022-03-08 07:43:27 -08:00
David Gilbertson
ab014978ae
Removed ambiguity in __init_subclass__ docs (GH-31540)
2022-03-07 20:13:01 -08:00
Alex Waygood
50731297a9
bpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects (GH-29479)
2022-03-07 19:49:28 -08:00
Pablo Galindo Salgado
7fb94fd7a8
bpo-46725: Document starred expressions in for statements (GH-31481)
...
Automerge-Triggered-By: GH:pablogsal
2022-02-22 09:26:46 -08:00
Zackery Spytz
b4bd1e1422
bpo-44977: Deprecate delegation of int to __trunc__ (GH-31031)
...
Calling int(a) when type(a) implements __trunc__ but not __int__
or __index__ now raises a DeprecationWarning.
2022-02-03 11:43:25 +02:00
Kinshuk Dua
08c0ed2d9c
bpo-23556: [doc] Fix inaccuracy in documentation for raise without args. Improve tests for context in nested except handlers. (GH-29236)
2022-01-27 10:24:48 +00:00
Julien Palard
bcafab849e
[doc]: Spotted errors while working on rstlint. (GH-30879)
...
Also ignored some `make suspicious` false positives while assuring
true positives were properly seen by rstlint.
2022-01-27 08:57:43 +01:00
Jacob Walls
273cb8e757
bpo-24650: Use full term "generator function" in yield expressions docs (GH-24663)
2022-01-07 18:39:40 +00:00
Irit Katriel
9925e70e48
bpo-45292: [PEP-654] exception groups and except* documentation (GH-30158)
2022-01-06 19:05:34 +00:00
Raymond Hettinger
a09bc3a404
bpo-46095: Improve SeqIter documentation. (GH-30316)
2022-01-01 10:37:26 -08:00
Alex Waygood
aeb9ef4c72
bpo-46076: Improve documentation for per-attribute docstrings with `__slots__` (GH-30109)
2021-12-19 14:20:07 -06:00
Pablo Galindo
3ea574f35b
Fix some false positives of documentation syntax problems
2021-12-08 22:22:55 +00:00
Raymond Hettinger
4ccccb1cfc
bpo-20751: Match variable name to the example. (GH-29980)
2021-12-07 21:38:21 -06:00
Alex Waygood
c0521fe49f
bpo-45840: Improve cross-references in the data model documentation (GH-29633)
2021-12-05 22:49:36 +02:00
Raymond Hettinger
135ecc3492
bpo-20751: Replace method example with attribute example, matching the descriptor howto (GH-29909)
2021-12-03 20:37:08 -06:00
Irit Katriel
8a45ca542a
bpo-45711: Change exc_info related APIs to derive type and traceback from the exception instance (GH-29780)
2021-11-30 22:37:04 +00:00
Arthur Milchior
cd876c8493
bpo-45619: documentation of execution model: clarify and update binding summary ( #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.
2021-11-25 21:19:06 -08:00
Jouke Witteveen
ee49484c0f
[doc] Clarify MRO precedence in descriptor super binding section (GH-29539)
...
A similar sentence is present in the 'Invocation from super' section of
the descriptor HOWTO, where it is already correct.
2021-11-20 17:55:35 +01:00
Brett Cannon
be36e06340
bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required by CPython (GH-29170)
...
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__`.
2021-11-19 16:40:34 -08:00
Arthur Milchior
32959108f9
bpo-45640: [docs] Tokens are now clickable (GH-29260)
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-18 17:06:38 +01:00
Alex Waygood
31b3a70edb
[doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389)
...
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.
2021-11-18 16:54:25 +01:00
Ethan Furman
6ecead106a
[doc] minor fixes to expressions.rst (GH-29444)
2021-11-06 10:26:43 -07:00
Arthur Milchior
d9c1868c25
bpo-45583: Correct datamodel documentation of int() (GH-29182)
...
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.
2021-10-28 21:48:37 +02:00
Tim Peters
51ed2c56a1
bpo-45530: speed listobject.c's unsafe_tuple_compare() (GH-29076)
...
Keep track of whether unsafe_tuple_compare() calls are resolved by the very
first tuple elements, and adjust strategy accordingly. This can significantly
cut the number of calls made to the full-blown PyObject_RichCompareBool(),
and especially when duplicates are rare.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-24 22:27:24 -05:00
Luca Chiodini
4ecd119b00
bpo-45463: Clarify that global statements allows multiple names (GH-28851)
...
The global statement allows specifying a list of identifiers
(https://docs.python.org/3/reference/simple_stmts.html#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.
2021-10-16 08:55:12 -04:00
Petr Viktorin
3dee0cb621
[docs] lexical_analysis: Expand the text on ``_`` (GH-28903)
...
Also:
* Expand the discussion into its own entry. (Even before this,
text on ``_`` was longet than the text on ``_*``.)
* Briefly note the other common convention for `_`: naming unused
variables.
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-13 18:34:01 +02:00
Christophe Nanteuil
0bcc5ade9b
Fix class pattern docs to refer to class patterns (GH-28849)
2021-10-10 22:12:51 +08:00
Christian Clauss
241bda785a
[doc] Fix typos found using codespell (GH-28744)
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-05 23:48:44 +02:00
Raymond Hettinger
db91b058d5
bpo-45346: Keep docs consistent regarding true and false values (GH-28697)
2021-10-02 13:48:08 -05:00
Serhiy Storchaka
4f05f15d7b
[docs] Improve the markup of powers (GH-28598)
2021-09-28 22:40:57 +02:00
Mohamad Mansour
8f943ca257
[codemod] Fix non-matching bracket pairs (GH-28473)
...
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-22 01:09:00 +02:00