Commit graph

660 commits

Author SHA1 Message Date
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
Miss Islington (bot)
8655521de8
bpo-32822: Add finally with return/break/continue to the tutorial (GH-25600) (#25893)
This documents in the tutorial docs the behavior of a finally clause in
case it should re-raise an exception but contains a
return/break/continue statement.
(cherry picked from commit a0b9915a8b)

Co-authored-by: Roberto Hueso <robertohueso96@gmail.com>
2021-05-04 15:17:40 +02:00
sblondon
2fd928c8c1
bpo-42589: Change URL for 'from' link when used in a raised exception (GH-23872)
Links for 'raise Exception from x' target to 'The raise statement' (7.8) section instead of 'The import statement' (7.11) section.

There are more modified links than in the bug report because I searched some other ones which can get the same improvement.
2021-04-29 11:02:40 -07:00
Bob Kline
133705b85c
bpo-43777: Drop description of "pip search" command from tutorial (GH-25287) 2021-04-14 14:09:32 +09:00
Raymond Hettinger
f8775e4f72
bpo-43325: Add FAQ entry for identity tests (GH-25168) 2021-04-03 19:54:49 -07:00
Irit Katriel
a53e9a7cf5
bpo-39231: correct tutorial annotations section (GH-25029) 2021-03-27 13:20:58 -04:00
cmhzc
8d00462850
bpo-43319: Fixed the tutorial on venv about standard library (GH-24740)
In the [official tutorial on virtual environment](https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments)

> This will create the tutorial-env directory if it doesn’t exist, and also create directories inside it containing a copy of the Python interpreter, **the standard library**, and various supporting files.

According to the actual behavior of `venv` and [PEP 405](https://www.python.org/dev/peps/pep-0405/#id15)'s description about virtual environment, no standard library file is included in the virtual environment's directory.

Automerge-Triggered-By: GH:vsajip
2021-03-07 01:08:50 -08:00
Daniel F Moisset
a22bca6b1e
bpo-42128: Add documentation for pattern matching (PEP 634) (#24664)
This is a first edition, ready to go out with the implementation. We'll iterate during the rest of the period leading up to 3.10.0.

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandt@python.org>
Co-authored-by: Raymond Hettinger <1623689+rhettinger@users.noreply.github.com>
Co-authored-by: Guido van Rossum <guido@python.org>
2021-02-28 20:08:38 -08:00
Terry Jan Reedy
b30fcba3a8
bpo-43042: Augment tutorial sentence (GH-24514)
Calling same function also gets new local namespace.
2021-02-19 19:26:21 -05:00
Adorilson Bezerra
89294e30ff
Doc: errors tutorial improvements (GH-16269)
Improvements:

- Improvements in how try clause works section
  This suggestion is because the execution continues after *except*, not after *try* but before *except*. I guess this form more clear.

- Surrounding some keywords with \*...\*
  For uniformity the highlighted terms  

- Adjust the number of chars per line to 80
2021-01-30 22:07:11 -08:00
Vladimir
3f9fe23c05
bpo-42179: Clarify exception chaining (GH-23160)
* Update errors.rst

Clarify exception chaining behaviour and give a reference to the library documentation.

* Update errors.rst

Wording

* Update errors.rst

Spelling

* Update errors.rst

Remove mentioning of special attributes as folks think it's too much for beginners.
2020-12-15 18:47:26 -08: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
Volker-Weissmann
c8aaf71dde
bpo-17852: Doc: Fix the tutorial about closing files (GH-23135)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2020-11-27 09:41:32 +09:00
Inada Naoki
bde33e428d
bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162) 2020-11-06 11:45:01 +09:00
Andre Delfino
c8bb24166e
[doc] Update references to NumPy (GH-22458)
Numeric(al) Python to NumPy. It seems the old name hasn't been used for some time.
2020-10-01 16:22:14 -07:00
Andre Delfino
e8a2076e14
Revert "Fix all Python Cookbook links (#22205)" (GH-22424)
This commit reverts commit ac0333e1e1 as the original links are working again and they provide extended features such as comments and alternative versions.
2020-09-27 01:47:25 +01:00
Andre Delfino
ac0333e1e1
Fix all Python Cookbook links (#22205) 2020-09-15 21:13:26 +01:00
Neeraj Samtani
7bcc6456ad
bpo-41776: Revise example of "continue" in the tutorial documentation (GH-22234)
Revise example of "continue" in the tutorial documentation
2020-09-15 09:39:29 -04:00
Denis Ovsienko
0be7c216e1
Fix grammar in Doc/tutorial/controlflow.rst (GH-21885)
Automerge-Triggered-By: @csabella
2020-08-19 04:29:47 -07:00
Victor Stinner
bb0b08540c
bpo-40204: Fix reference to terms in the doc (GH-21865)
Sphinx 3 requires to refer to terms with the exact case.

For example, fix the Sphinx 3 warning:

Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.
2020-08-14 12:20:05 +02:00
Paul McMillan
4f28f75dee
Fix repeated words in Classes tutorial (GH-21455)
The phrase "At any time during execution," was repeated twice.

Automerge-Triggered-By: @Mariatta
2020-07-13 18:26:23 -07:00
Joannah Nanjekye
d12af71047
bpo-28681: Clarify multiple function names in the tutorial (GH-21340)
* improve control flow docs

* Add also

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-07-05 22:47:15 -03:00
Joannah Nanjekye
9ed3cd8ba0
bpo-26205: Specify the number of nested scopes (GH-21324)
* Clarify number of scopes

* Indicate 3 or 4

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-07-05 22:42:24 -03:00
Adorilson Bezerra
eaca2aa117
Improve IO tutorial's "Old string formatting" section (GH-16251)
* Use a more universal explanation of string interpolation rather than specifically referencing sprintf(), which depends on the reader having a C background.


Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-05-27 21:34:01 -04:00
Antoine
6fad3e6b49
bpo-40552 Add 'users' variable in code sample (tutorial 4.2). (GH-19992)
* Add 'users' variable in code sample.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2020-05-22 21:29:34 -03:00
Pablo Galindo
d4fe098d1e
Python 3.10.0a0 (GH-20198) 2020-05-19 03:33:01 +01:00
Rahul Kumaresan
eefd4e0333
bpo-39705 : sorted() tutorial example under looping techniques improved (GH-18999) 2020-05-17 18:32:34 -07:00
Noah Doersing
8bcfd31cc0
Change 'exception happened' to 'exception occurred' in two places (#19767) 2020-04-30 21:30:10 -07:00