Commit Graph

721 Commits

Author SHA1 Message Date
Serhiy Storchaka be99653080
[3.11] Improve references in the tutorial (GH-108069) (GH-108204)
* Use full qualified names for references (even if they do not work now,
  they will work in future).
* Silence references to examples.
(cherry picked from commit 622ddc4167)
2023-08-21 10:53:36 +00:00
Adam Turner 6dd1729a88
[3.11] GH-107987: Remove the Distributing Python Modules guide (GH-108016) (#108091)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-18 10:12:07 +03:00
Miss Islington (bot) 3c1bcae075
[3.11] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) (GH-107418)
(cherry picked from commit f2d07d3289)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-29 09:17:20 +03:00
Miss Islington (bot) 8725d36fda
[3.11] gh-107017: Change Chapter Strings to Texts in the Introduction chapter. (GH-107104) (#107168)
Co-authored-by: TommyUnreal <45427816+TommyUnreal@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-24 16:39:43 +00:00
Miss Islington (bot) 6138ecdeb8
[3.11] gh-107017: Analolgy to Pascal and C replaced. (GH-107025) (#107123)
Co-authored-by: TommyUnreal <45427816+TommyUnreal@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-23 13:59:05 +00:00
Miss Islington (bot) 5575b1204b
[3.11] gh-71261: Add paragraph on shadowing submodules with star imports (GH-107004) (#107099)
Co-authored-by: wulmer <wulmer@users.noreply.github.com>
2023-07-23 03:12:52 -06:00
Miss Islington (bot) 7d414873b3
[3.11] gh-107017: removed mention that C does it the same way (GH-107020) (#107098)
Co-authored-by: Jakub Červinka <cervinka.jakub.1989@gmail.com>
2023-07-23 03:11:35 -06:00
Łukasz Langa c65ca7097a
[3.11] Reformat code block to make it easier to read (GH-106965) (#107022)
(cherry picked from commit ed491d9f78)

Co-authored-by: Joe Kaufeld <opensource@joekaufeld.com>
2023-07-22 16:14:24 +02:00
Miss Islington (bot) 6193f783d0
[3.11] gh-106780: Add __match_args__ to tutorial example (GH-106784) (#106820)
Add Point definition with this attribute before example
that needs it.
(cherry picked from commit 7aa89e505d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-17 04:15:52 -04:00
Miss Islington (bot) 549b528abe
[3.11] gh-106625 : Add missing code to tutorial 4.6 example (GH-106623) (#106637)
(cherry picked from commit d0b7e18262)

Co-authored-by: RustyNail <takonoyawarakaage@yahoo.co.jp>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-11 13:40:17 -04:00
Miss Islington (bot) 80117dd450
[3.11] Doc: Add missing ref labels to exception groups/notes sections (GH-106465) (#106474)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-07-06 00:05:04 -06:00
Shantanu 161fc18edc
[3.11] gh-104479: Update outdated tutorial floating-point reference (GH-104681) (#104961)
(cherry picked from commit 2cf04e455d)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2023-05-26 06:30:03 +00:00
Miss Islington (bot) 4b11af058e
[3.11] GH-97950: Use new-style index directive ('builtin') (GH-104164) (#104221)
GH-97950: Use new-style index directive ('builtin') (GH-104164)

* Uncomment builtin removal in pairindextypes

* Use new-style index directive ('builtin') - C API

* Use new-style index directive ('builtin') - Extending

* Use new-style index directive ('builtin') - Library

* Use new-style index directive ('builtin') - Reference

* Use new-style index directive ('builtin') - Tutorial
(cherry picked from commit f5088006ca)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-06 07:14:37 +03:00
Miss Islington (bot) 6a970ae666
[3.11] GH-97950: Use new-style index directive ('statement') (GH-104162) (#104163)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-04 13:57:14 +03:00
Miss Islington (bot) c463796ba7
[3.11] GH-97950: Use new-style index directive ('object') (GH-104158) (#104159)
GH-97950: Use new-style index directive ('object') (GH-104158)

* Uncomment object removal in pairindextypes

* Use new-style index directive ('object') - C API

* Use new-style index directive ('object') - Library

* Use new-style index directive ('object') - Reference

* Use new-style index directive ('object') - Tutorial
(cherry picked from commit 6ab463684b)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-04 13:14:16 +03:00
Adam Turner 00563694bb
[3.11] GH-97950: Use new-style index directive ('module') (GH-103996) (#104154) 2023-05-04 11:39:15 +03:00
Miss Islington (bot) f79cfb6625
[doc] Fix error in tutorial example: type(exc) is the type rather than the instance (GH-102751)
(cherry picked from commit 8709697292)

Co-authored-by: Jens-Hilmar Bradt <17177271+jenshb@users.noreply.github.com>
2023-03-22 11:51:48 -07:00
Miss Islington (bot) a166cb4131
gh-102703: Fix typo in modules tutorial documentation (GH-102707)
**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>
2023-03-14 17:11:56 -07:00
Miss Islington (bot) 738dde303b
[3.11] gh-102354: change python3 to python in docs examples (GH-102696) (#102697)
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>
2023-03-14 12:52:33 -06:00
Miss Islington (bot) 4392bf648f
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:31:43 -08:00
Miss Islington (bot) f80ba44f7d
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:59 -08:00
Miss Islington (bot) de621281ce
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:45:45 -08:00
Miss Islington (bot) a7eee898ab
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:00 -08:00
Miss Islington (bot) 71b032635d
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:25:06 -08:00
Miss Islington (bot) e0fc2b3fd1
[doc] fix typo (GH-99143)
(cherry picked from commit 586b07e1f9)

Co-authored-by: Doj <34577424+visualdoj@users.noreply.github.com>
2022-11-05 14:12:22 -07:00
Miss Islington (bot) 129de5d4a2
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:34 -07:00
Miss Islington (bot) e02ce485ac
[3.11] Missing PS1 prompt in tutorial example (GH-98921) (GH-98944)
(cherry picked from commit d22bde983e)


Co-authored-by: Manuel Kaufmann <humitos@gmail.com>

Automerge-Triggered-By: GH:rhettinger
2022-11-01 04:08:26 -07:00
Miss Islington (bot) b2f037cce7
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:08:56 -07:00
Miss Islington (bot) a2f728038e
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:26 -07:00
Miss Islington (bot) 3dc7bfee3e
[3.11] gh-97654: Add auto exception chaining example to tutorial (GH-97703) (#97885)
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>
2022-10-05 14:50:46 -07:00
Miss Islington (bot) 1a620c579d
[3.11] Use SyntaxError invalid range in tutorial introduction example (GH-93031) (GH-97666)
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:22 +01:00
Miss Islington (bot) 4d1de87042
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:45 -07:00
Miss Islington (bot) ad49555d51
gh-81039: Add small example of f-string's "=}" to tutorial (gh-92291) (gh-96989)
(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:11:48 -04:00
Miss Islington (bot) a1671a97d3
gh-95413: Remove references to deprecated CGI library (GH-95414)
(cherry picked from commit b17aae8bbd)

Co-authored-by: partev <petrosyan@gmail.com>
2022-08-30 04:22:19 -07:00
Miss Islington (bot) fedd25eb64
small grammatical change (GH-96138) (GH-96157) 2022-08-21 15:55:00 -05:00
Miss Islington (bot) a1a1fd0dee
Doc: Add omitted secondary prompt in inputoutput tutorial (GH-30317)
For the continuation lines, "..." should present as secondary prompt
(cherry picked from commit de28ee8f75)

Co-authored-by: Chenwei Xiao <chanvinxiao@163.com>
2022-07-23 02:33:17 -07:00
Miss Islington (bot) 3a33e9b7a0
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:41 -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
Miss Islington (bot) cbd562ff4e
Docs: Update SyntaxError message in REPL example for list comprehension (GH-93901) (GH-94425)
(cherry picked from commit 22b783aba0)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2022-06-29 19:22:11 +02:00
Miss Islington (bot) 3937dbfaf8
gh-61585: Clarify import scope in modules tutorial (GH-93455) (GH-94373)
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:29:38 +02:00
Miss Islington (bot) 00a25f87f3
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:02 -07:00
Miss Islington (bot) 5bca4bba98
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:05:04 -07:00
Miss Islington (bot) 736f545cd3
Tutorial: specify match cases don't fall through (GH-93615) (GH-94083)
(cherry picked from commit dd5cf84f24)

Co-authored-by: max <36980911+pr2502@users.noreply.github.com>
2022-06-21 21:52:47 +02:00
Łukasz Langa c76e6f745c
[3.11] gh-93240: clarify wording in IO tutorial (GH-93276) (GH-94082)
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:15 +02:00
Miss Islington (bot) 9a2fe42b11
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:18:09 -07:00
Miss Islington (bot) b6da20fffa
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:45:14 -07:00
gophra a79001ee16
gh-92368: Fix missing possessive apostrophe (#92397)
* Fix missing possessive apostrophe
2022-05-06 15:39:16 +02:00
Inada Naoki 614420df97
gh-85679: Recommend `encoding="utf-8"` in tutorial (GH-91778) 2022-05-02 17:25:05 +09: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
Irit Katriel f92bcfe6de
gh-89770: [PEP-678] add exception notes to tutorial (GH-30441) 2022-04-20 13:43:10 +01:00