Commit graph

687 commits

Author SHA1 Message Date
Miss Islington (bot)
42b14044aa
docs: replace PyPI description with link (GH-101506)
(cherry picked from commit 45d014e03b)

Co-authored-by: François Magimel <magimel.francois@gmail.com>
2023-02-02 23:29:56 -08:00
Miss Islington (bot)
f7ad4ffa56
gh-100633 Tutorial: Fix dataclasses import (GH-100638)
import dataclass not dataclasses from dataclasses
(cherry picked from commit 98308dbeb1)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2022-12-31 04:28:36 -08:00
Miss Islington (bot)
97a3e18c88
gh-55688: Add note about ending backslashes for raw strings (GH-94768)
(cherry picked from commit b95b1b3b25)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
2022-12-27 21:39:53 -08:00
Miss Islington (bot)
3ea6f7fee8
gh-99908: Tutorial: Modernize the 'data-record class' example (GH-100499)
(cherry picked from commit 00afa5066b)

Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-12-24 07:32:29 -08:00
Miss Islington (bot)
eece1bdca7
gh-70393: Clarify mention of "middle" scope (GH-98839)
(cherry picked from commit 70be5e42f6)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-12-11 20:26:30 -08:00
Miss Islington (bot)
8648c06b9b
Doc: use "unnumbered" footnotes (GH-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.
(cherry picked from commit f042646595)

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
2022-11-01 06:35:26 -07:00
Miss Islington (bot)
2ed28a69b5
tutorial: remove "with single quotes" (GH-98204)
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>
2022-10-12 09:07:49 -07:00
Miss Islington (bot)
8827b95e80
doc: remove a misleading statement. (GH-98093)
(cherry picked from commit 571e23d991)

Co-authored-by: Julien Palard <julien@palard.fr>
2022-10-10 01:50:17 -07:00
Miss Islington (bot)
9f1c9b1a7a
[3.10] gh-97654: Add auto exception chaining example to tutorial (GH-97703) (#97884)
Add auto exception chaining example to tutorial
(cherry picked from commit 395b66a0ae)

Co-authored-by: Shahriar Heidrich <smheidrich@weltenfunktion.de>
2022-10-05 14:51:10 -07:00
Miss Islington (bot)
ba52d01437
[3.10] Use SyntaxError invalid range in tutorial introduction example (GH-93031) (GH-97667)
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>
2022-09-30 10:12:55 +01:00
Miss Islington (bot)
437032e313
gh-96959: Update HTTP links which are redirected to HTTPS (GH-96961)
(cherry picked from commit db39050396)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-09-25 01:20:53 -07:00
Miss Islington (bot)
c166541b25
gh-81039: Add small example of f-string's "=}" to tutorial (gh-92291) (gh-96990)
(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>
2022-09-21 09:12:12 -04:00
Miss Islington (bot)
e71e6e2ce5
Doc: Add omitted secondary prompt in inputoutput tutorial (GH-30317) (#95159)
For the continuation lines, "..." should present as secondary prompt
(cherry picked from commit de28ee8f75)

Co-authored-by: Chenwei Xiao <chanvinxiao@163.com>

Co-authored-by: Chenwei Xiao <chanvinxiao@163.com>
2022-07-23 18:28:15 +08:00
Miss Islington (bot)
9f4d0e807d
Fix copy-friendliness of tutorial example (GH-93424)
(cherry picked from commit 34d11f1b0c)

Co-authored-by: Chenwei Xiao <chanvinxiao@163.com>
2022-07-22 13:21:07 -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
Miss Islington (bot)
7244c57701
Docs: Update SyntaxError message in REPL example for list comprehension (GH-93901) (GH-94426)
(cherry picked from commit 22b783aba0)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2022-06-29 19:22:22 +02:00
Miss Islington (bot)
d11b0108c3
gh-61585: Clarify import scope in modules tutorial (GH-93455) (GH-94374)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
(cherry picked from commit 4b854b7466)
2022-06-28 12:30:09 +02:00
Miss Islington (bot)
ee5e1e4ee6
Closes gh-94152: Update pyvideo.org URL (GH-94075)
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>
2022-06-22 20:43:15 -07:00
Miss Islington (bot)
64b02c6304
gh-94114: Remove obsolete reference to python.org mirrors (GH-94115)
* gh-94114
(cherry picked from commit 8661c5053f)

Co-authored-by: partev <petrosyan@gmail.com>
2022-06-22 10:03:37 -07:00
Miss Islington (bot)
4b2d7f3f4e
Tutorial: specify match cases don't fall through (GH-93615) (GH-94084)
(cherry picked from commit dd5cf84f24)

Co-authored-by: max <36980911+pr2502@users.noreply.github.com>
2022-06-21 21:53:07 +02:00
Miss Islington (bot)
6432a8972b
gh-93240: clarify wording in IO tutorial (GH-93276) (GH-94081)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit 51d673176a)

Co-authored-by: paulreece <96156234+paulreece@users.noreply.github.com>
2022-06-21 21:51:34 +02:00
Miss Islington (bot)
c8f1095e0a
gh-89158: Add some REPL secondary prompt markers (GH-93073)
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>
2022-05-22 22:17:15 -07:00
Miss Islington (bot)
ca425ac11a
gh-77521: Add link to builtin module names in modules tutorial (GH-92438)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 859250cc55)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-05-08 12:46:18 -07:00
Miss Islington (bot)
17f3b5cbfa
gh-92368: Fix missing possessive apostrophe (GH-92397)
* Fix missing possessive apostrophe
(cherry picked from commit a79001ee16)

Co-authored-by: gophra <105054704+gophra@users.noreply.github.com>
2022-05-06 07:12:59 -07:00
Miss Islington (bot)
a7d3de7fe6
gh-85679: Recommend encoding="utf-8" in tutorial (GH-91778)
(cherry picked from commit 614420df97)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2022-05-02 01:45:10 -07:00
Miss Islington (bot)
e5636f3a0e
gh-91541: Fix error in example in modules tutorial (GH-91634)
(cherry picked from commit efbc668183)

Co-authored-by: 180909 <734461790@qq.com>
2022-04-17 14:30:57 -07:00
Miss Islington (bot)
a331d0f627
Follow PEP-8 guidelines in tutorial for standard library (GH-26127)
(cherry picked from commit 6db2db91b9)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
2022-04-03 15:49:52 -07:00
Jelle Zijlstra
5d2b9c9fe4
[3.10] docs: Don't use code formatting for emphasis (GH-30519) (GH-31764)
(cherry picked from commit badb637c8c)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
2022-03-08 07:42:54 -08:00
Miss Islington (bot)
feb4455088
docs: Link match statement in tutorial (GH-31396)
Add a link to the `match` statement from its section in the tutorial.

Automerge-Triggered-By: GH:Mariatta
(cherry picked from commit 35f55cc5c6)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
2022-02-17 23:15:00 -05:00
Miss Islington (bot)
2e6798f352
bpo-46270: Describe the in and not in operators as membership tests. (GH-30504) (GH-30509) 2022-01-09 18:31:51 -08:00
Miss Islington (bot)
0b3c3cbbaf
bpo-34538: Remove Exception subclassing from tutorial (GH-30361)
Remove the bit about subclassing exceptions.

Documentation PR can skip the NEWS label.

Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit 2db5613063)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-01-03 15:10:20 -08:00
Miss Islington (bot)
2bd7354695
bpo-46079: Replace external link that is down for maintenance. (GH-30315) (GH-30328) 2022-01-01 10:12:59 -08:00
Miss Islington (bot)
fb5d314da8
Fix the output of built-in iter() function example in Iterators (Section 9.8) of The Python Tutorial (GH-30110)
Updated the output for it=iter(s) from <iterator object at 0x00A1DB50> to <str_iterator object at 0x10c90e650>
(cherry picked from commit c5d18a5014)

Co-authored-by: Vivek Vashist <vivekvashist@gmail.com>
2021-12-16 03:00:58 -08:00
Miss Islington (bot)
503803d8c1
bpo-46059: Clarify pattern-matching example in "control flow" docs (GH-30079)
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>
(cherry picked from commit 1cbb88736c)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-12-14 07:25:32 -08:00
Miss Islington (bot)
f6648e229e
bpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896)
(cherry picked from commit 9f2f7e4226)

Co-authored-by: Zachary Ware <zach@python.org>
2021-12-02 12:45:09 -08:00
Miss Islington (bot)
2c4792264f
Closes bpo-45712: Add missing word in control flow tutorial (GH-29460)
(cherry picked from commit 7484a5c82a)

Co-authored-by: 180909 <734461790@qq.com>
2021-11-08 09:13:02 -08:00
Miss Islington (bot)
00ddc1fbd7
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105) (GH-29119)
(cherry picked from commit 5a14f71fe8)

Co-authored-by: Thomas <thmsdnnr@gmail.com>
2021-10-21 14:41:32 +02:00
Miss Islington (bot)
87f97fe5e6
bpo-38623: Add note about site module (site-packages) (GH-16974) (GH-28536)
(cherry picked from commit 55b45bf707)

Co-authored-by: Peter Bittner <django@bittner.it>
2021-09-24 00:48:06 +02:00
Miss Islington (bot)
1493e1a40d
bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28523)
Replace old names when they refer to actual versions of macOS.
Keep historical names in references to older versions.

Co-authored-by: Patrick Reader <_@pxeger.com>
(cherry picked from commit 36122e1814)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-23 13:25:31 +03:00
Miss Islington (bot)
ec5a03168f
bpo-39452: Rewrite and expand __main__.rst (GH-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>
(cherry picked from commit 7cba23164c)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-08-24 13:54:08 -07:00
Miss Islington (bot)
95a9ba173e
bpo-44966: Fix out-of-date traceback message (GH-27867)
(cherry picked from commit 15a64d89a3)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-08-21 17:35:32 -07:00
Miss Islington (bot)
f20f061cfa
introduce omitted index default before using it (GH-27775) (GH-27802)
(cherry picked from commit 599f5c8481)

Co-authored-by: Jefferson Oliveira <jefferson.dev.insights@gmail.com>
2021-08-17 23:42:50 +02:00
Miss Islington (bot)
25122b2cf9
bpo-44907: Update error messages in tutorial examples (GH-27755)
(cherry picked from commit ed524b4569)

Co-authored-by: meowmeowmeowcat <meowmeowcat1211@gmail.com>
2021-08-13 20:25:11 -04:00
Miss Islington (bot)
699ee016af
bpo-41576: document BaseException in favor of bare except (GH-21917)
(cherry picked from commit e9a6f1b78b)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2021-08-06 14:14:40 -07:00
Miss Islington (bot)
6fc1efa454
bpo-44740: Lowercase "internet" and "web" where appropriate. (GH-27378) (GH-27380)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 11749e2dc2)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-27 00:34:32 +02:00
Miss Islington (bot)
aeb63392e7
bpo-40620: Clarify tutorial controlflow.rst `range` examples (GH-26919) (GH-26927)
(cherry picked from commit 2f49c9debc)

Co-authored-by: jdevries3133 <58614260+jdevries3133@users.noreply.github.com>
2021-06-27 20:51:16 +01:00
Miss Islington (bot)
150bc1f4aa
bpo-43927: Change 'IOError' to 'OSError' (GH-26289)
This is the last remaining instance, at least for this chapter, in 3.10 & 3.11.
(cherry picked from commit 2f47d8dcc7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-21 11:15:36 -07:00
Miss Islington (bot)
5f2afff1dd
bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411) (GH-26218)
(cherry picked from commit 4fdcc39f71)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2021-05-19 09:59:23 +01:00
Miss Islington (bot)
dd4f7d96cb
bpo-43729: Clarify comment in tutorial example (GH-25191) (#26136)
(cherry picked from commit 07797121cc)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-14 13:06:09 -07:00
Miss Islington (bot)
48cb11bf5b
bpo-40640: doc -- add missing ... in example of Continue (GH-26055) (GH-26057)
Co-authored-by: Chas Belov <59780179+ChasBelov@users.noreply.github.com>
(cherry picked from commit 6574334a68)


Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2021-05-12 11:25:54 +01:00