slateny
549567c6e7
gh-80143: Add clarification for escape characters ( #92292 )
2022-05-10 11:12:29 -05: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
Raymond Hettinger
94b462686b
bpo-45198: __set_name__ documentation not clear about its usage with non-descriptor classes (GH-28439)
2021-09-18 01:49:43 -05:00
Benjamin Peterson
024fda47d4
closes bpo-45190: Update Unicode data to version 14.0.0. (GH-28336)
2021-09-14 11:00:38 -07:00
Pablo Galindo Salgado
ab327f2929
bpo-44964: Correct the note about the f_lasti field (GH-28208)
2021-09-10 17:53:42 +02:00
Raymond Hettinger
fa15df77f0
bpo-45104: Clarify when __init__ is called (GH-28210)
2021-09-07 18:04:39 +02:00
Pablo Galindo Salgado
fa2c0b85a8
bpo-44964: Add a note explaining the new semantics of f_last_i in frame objects (GH-28200)
2021-09-07 12:18:54 +01:00
Objectivitix
806e25fd31
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951)
2021-08-26 08:49:02 +03:00
Jack DeVries
7cba23164c
bpo-39452: Rewrite and expand __main__.rst ( #26883 )
...
Broadened scope of the document to explicitly discuss and differentiate between ``__main__.py`` in packages versus the ``__name__ == '__main__'`` expression (and the idioms that surround it), as well as ``import __main__``.
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-24 19:01:41 +02:00
William Chargin
80f33f266b
bpo-41706: Fix special method invocation docs to mention using type() (GH-22084)
2021-08-04 13:43:06 -07:00