**Before**
This prevents directories with a common name, such as ``string``, unintentionally hiding ...
**After**
This prevents directories with a common name, such as ``string``, from unintentionally hiding ...
(cherry picked from commit 0a539b5db3)
Co-authored-by: Robert Prater (B. Eng) <robcprater@gmail.com>
gh-102354: change python3 to python in docs examples (GH-102696)
(cherry picked from commit 80abd62647)
Co-authored-by: Paul Watson <paul.hermeneutic@gmail.com>
import dataclass not dataclasses from dataclasses
(cherry picked from commit 98308dbeb1)
Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
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.
(cherry picked from commit f042646595)
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
Closes GH-91856.
On Windows double quotes are sometimes better, on Unix usually
single quotes. It's not our place to explain that, so just don't.
(cherry picked from commit 5f8ca1b796)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
gh-97654: Add auto exception chaining example to tutorial (GH-97703)
Add auto exception chaining example to tutorial
(cherry picked from commit 395b66a0ae)
Co-authored-by: Shahriar Heidrich <smheidrich@weltenfunktion.de>
Use SyntaxError invalid range in tutorial introduction example (GH-93031)
Use output from a 3.10+ REPL, showing invalid range, for the
SyntaxError examples in the tutorial introduction page.
Co-authored-by: Eddie Hebert <eddie@eddiehebert.com>
(cherry picked from commit 4b81139aac)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
For the continuation lines, "..." should present as secondary prompt
(cherry picked from commit de28ee8f75)
Co-authored-by: Chenwei Xiao <chanvinxiao@163.com>
The URL is now https://pyvideo.org, which uses HTTPS and avoids a redirect.
(cherry picked from commit 7c439dca13)
Co-authored-by: partev <petrosyan@gmail.com>
This fixes an issue on tutorial/classes.rst section 9.4 where the example "class Warehouse"
was truncated when pressing the >>> button to hide the prompts and output.
(cherry picked from commit 88f0d0c1e8)
Co-authored-by: Nicolas Haller <nicolas@haller.im>
#85757https://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
Add a link to the `match` statement from its section in the tutorial.
This should be backported to 3.10.
[Initially submitted as #31395 but against the wrong branch. Thanks @Mariatta]
Automerge-Triggered-By: GH:Mariatta
The "Color" example in the pattern-matching section of the "control flow" documentation is not immediately runnable, leading to confusion.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>