93 Commits

Author SHA1 Message Date
Serhiy Storchaka 17070f41d4 gh-144837: Improve documentation for more collection methods (GH-144841)
Use uniform standard signature syntax in the tutorial and in
the array and collections modules documentation.
2026-03-26 21:29:23 +02:00
Ned Batchelder 4f5e79805e Docs: a brief note in the sets tutorial about order (#145984)
Docs: a brief note in the sets tut about order
2026-03-17 05:03:11 -04:00
Ned Batchelder 852ec18978 Docs: remove unneeded author attributions (#145002)
These directives are not maintained and misleadingly indicate individual
rather than community ownership.

See https://github.com/python/docs-community/issues/180 for discussion,
and https://github.com/python/devguide/pull/1740 for an update to the
devguide.

Also ensured that everyone is in the Misc/ACKS file.
2026-02-19 18:45:28 -05:00
Ronald Eddy Jr 3718f4be60 Fix typos and grammar errors across documentation (#144709) 2026-02-11 16:35:25 +00:00
adam j hartz ccbe41e27c gh-143055: Implementation of PEP 798 (#143056)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-01-30 20:37:52 -08:00
Krishna Chaitanya 92741c59f8 gh-140379: add hyperlinks to list and set (GH-140399)
add hyperlinks to list and set
2025-11-10 22:02:46 -08:00
Cycloctane 69cfad0b3e gh-116488: Mention dict.get in the data structures tutorial (GH-139643) 2025-10-06 09:04:59 -04:00
Adam Turner 8ed1d53e62 GH-138465: Improve documentation for common sequence methods (#138474)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-09-05 20:55:02 +01:00
Ric f19f1d8563 gh-107194: Improved language of list.index in tutorial (gh-138518) 2025-09-05 15:16:04 +08:00
Yuki Kobayashi 77a61c0465 gh-101100: amend references starting with !~ in gh-127054 (#127684) 2024-12-06 16:09:20 +02:00
Yuki Kobayashi 3e812253ab gh-101100: Fix Sphinx warnings about list methods (#127054) 2024-12-02 15:51:35 +02:00
Stephen Rosen 4a2282b067 Prefer "similar" over "equivalent" in tutorial (#125343)
In the datastructures tutorial doc, some operations are described as
"equivalent to" others. This has led to some user-confusion -- at
least in the Discourse forums -- about cases in which the operations
differ.

This change doesn't systematically eliminate the word "equivalent"
from the tutorial. It just substitutes "similar to" in several cases
in which "equivalent to" could mislead users into expecting exact
equivalence.
2024-10-12 16:21:55 -04:00
Damien be90648fb2 gh-122944: Fix incorrect prompt strings in the Python Tutorial (#122949)
In the REPL, top level comments are followed by a primary, not secondary prompt.
Fix the places in the in the tutorial that use the latter.
2024-08-12 14:30:08 -04:00
Serhiy Storchaka 05c2fe1acd Format None, True, False and NotImplemented as literals (GH-118758) 2024-05-08 22:35:16 +03:00
srinivasan 57c3e775df gh-114648: Add IndexError exception to tutorial datastructures list.pop entry (#114681)
Remove redundant explanation of optional argument.
2024-01-31 22:46:49 -05:00
Serhiy Storchaka 622ddc4167 Improve references in the tutorial (GH-108069)
* Use full qualified names for references (even if they do not work now,
  they will work in future).
* Silence references to examples.
2023-08-21 13:41:01 +03:00
Manuel Kaufmann f042646595 Doc: use "unnumbered" footnotes (#98954)
Use unnumbered footnote in this file to avoid reseting the footnotes numbering.

Example: when building the tutorial into a PDF and using `latex_show_urls = "footnotes"`; this footnote become the number 8. However, without this change, the footnote shows the number 1.
2022-11-01 13:25:33 +00:00
sand8089 d8c7a1174c small grammatical change (GH-96138)
changed a to an under An example that uses most of the list methods
2022-08-21 09:56:52 -05:00
Cheryl Sabella 22b783aba0 Docs: Update SyntaxError message in REPL example for list comprehension (GH-93901) 2022-06-29 19:06:51 +02:00
slateny efb87b1090 gh-85757: Change wording from nested to inner (GH-91811)
#85757

https://docs.python.org/3/tutorial/datastructures.html#nested-list-comprehensions

I do think this is clearer, but I wonder if 'nested' should be kept though to get the terminology out there more often. So perhaps it could be something like 'inner (nested) listcomp' or 'nested (inner) listcomp' despite sounding a bit redundant

Automerge-Triggered-By: GH:rhettinger
2022-04-30 15:12:33 -07:00
Raymond Hettinger d24cd49acb bpo-46270: Describe the in and not in operators as membership tests. (GH-30504) 2022-01-09 18:02:06 -08:00
Raymond Hettinger f8775e4f72 bpo-43325: Add FAQ entry for identity tests (GH-25168) 2021-04-03 19:54:49 -07:00
Zackery Spytz d41ec65ab7 bpo-42489: Fix the signature for list.sort() in the tutorial (GH-23538) 2020-11-28 16:53:39 +02:00
Rahul Kumaresan eefd4e0333 bpo-39705 : sorted() tutorial example under looping techniques improved (GH-18999) 2020-05-17 18:32:34 -07:00
Adorilson Bezerra 5807efd4c3 bpo-38558: Link to further docs from walrus operator mention in tutorial (GH-16973) 2020-02-03 18:11:19 +01:00
Ammar Askar cb2cf06b0a bpo-38558: Mention := in conditions tutorial (GH-16919) 2019-10-25 17:20:05 -05:00
Raymond Hettinger 4109263a7e bpo-14050: Note that not all data can be sorted (GH-15381) 2019-08-22 09:11:35 -07:00
Emmanuel Arias b00479d42a bpo-36377: Specify that range() can not be compared (GH-12468) 2019-04-01 21:52:42 -07:00
Serhiy Storchaka 2b57c43f21 bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
Stéphane Wirtel e483f02423 bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037) 2018-10-26 12:52:11 +02:00
Lysandros Nikolaou bcd1d971b6 Update list.remove(x) documentation (GH-8636)
Rephrase it to "It raises a `ValueError`"
2018-08-02 19:45:48 -07:00
hui shang dfbbbf16f9 bpo-32337: Update documentats about dict order (GH-4973) 2018-04-04 13:55:05 +09:00
KatherineMichel ca81615344 bpo-30312: Small correction in datastructures set code sample (GH-2081) 2017-06-10 12:19:09 -07:00
UltimateCoder 8856940cf2 bpo-28315: Improve code examples in docs (GH-1372)
Replace
   File "<stdin>", line 1, in ? 
with 
   File "<stdin>", line 1, in <module>
2017-05-03 09:46:45 -07:00
Xiang Zhang b2d77175d1 bpo-29756: Improve documentation for list methods that compare items by equality (GH-572) 2017-03-13 10:09:16 +08:00
Jim Fasarakis-Hilliard 53c1892dc3 Fix small typos in introduction and datastructures of tutorial (GH-272)
* Fix small typos in introduction and datastructures
* Use iterable instead of L in the doc for list.extend
2017-02-25 13:13:33 -08:00
Raymond Hettinger 8c5e190d36 Issue #28587: Improve list examples in the tutorial 2016-11-21 16:29:50 -08:00
Raymond Hettinger 5bd5b9d813 Issue 28587: list.index documentation missing start and stop arguments. (Contributed by Mariatta Wijaya.) 2016-11-21 15:12:54 -08:00
Serhiy Storchaka 6a7b3a77b4 Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
Raymond Hettinger 502bf511b3 Improve tutorial suggestion for looping techniques 2015-09-01 02:33:02 -07:00
Georg Brandl 3be472b5f7 Closes #23181: codepoint -> code point 2015-01-14 08:26:30 +01:00
R David Murray bbf4ae51e4 Merge #21739: mention subtle difference between loops and listcomps in tutorial. 2014-09-30 21:26:24 -04:00
R David Murray 6bd68608ff #21739: mention subtle difference between loops and listcomps in tutorial.
We don't want to go into a full explanation of scopes at this point in the
tutorial, so we just mention that the loop creates or overwrites a persistent
variable while the listcomp doesn't.  Not mentioning this would lead someone
to incorrectly assume loops and listcomps were *completely* equivalent, which
would confuse them later.

Original patch by Rose Ames, tweaked to remove the word 'scope'.
2014-09-30 21:25:38 -04:00
Raymond Hettinger 07e048519b Issue 21575: Show list.sort() arguments in the tutorial. 2014-05-26 18:44:04 -07:00
Terry Jan Reedy e17de09101 Issue #21545: Add .pop example and tweak comment about pure mutation methods.
Patch prepared by David Harrigan.
2014-05-23 00:34:12 -04:00
Georg Brandl a12b682033 Add missing list methods. Found by Leonardo Pereira on docs@. 2013-10-06 13:01:19 +02:00
Ezio Melotti 0bbfae3be4 Merge rephrasing with 3.2. 2012-11-17 12:06:26 +02:00
Ezio Melotti 89b03b0ec6 Rephrase a sentence in the set and dict comprehensions tutorial page. 2012-11-17 12:06:01 +02:00
Chris Jerdonek 38049bb251 Issue #16225: Merge from 3.2: Add additional note to tutorial about looping. 2012-10-15 19:46:34 -07:00
Chris Jerdonek 4fab8f0e06 Issue #16225: Add additional note to tutorial about changing sequence while looping. 2012-10-15 19:44:47 -07:00