summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] gh-129641: Docs GHA build: use upload-artifact@v4 (GH-129642) (#130114)Petr Viktorin2025-02-181-1/+1
| | | | | Co-authored-by: shallow-beach <96891913+shallow-beach@users.noreply.github.com> fix (#128077)
* gh-77521: Add link to builtin module names in modules tutorial (GH-92438)Miss Islington (bot)2022-05-081-1/+2
| | | | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit 859250cc55711f4d62b65922d3f7537826c3801e) Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
* gh-92368: Fix missing possessive apostrophe (GH-92397)Miss Islington (bot)2022-05-061-1/+1
| | | | | | * Fix missing possessive apostrophe (cherry picked from commit a79001ee16b3ea8b5d0fad595c969d9e1b7627f3) Co-authored-by: gophra <105054704+gophra@users.noreply.github.com>
* gh-85679: Recommend `encoding="utf-8"` in tutorial (GH-91778)Miss Islington (bot)2022-05-021-10/+18
| | | | | (cherry picked from commit 614420df9796c8a4f01e24052fc0128b4c20c5bf) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* gh-91541: Fix error in example in modules tutorial (GH-91634)Miss Islington (bot)2022-04-171-1/+1
| | | | | (cherry picked from commit efbc668183400597070356a2df2fbab114a53cb3) Co-authored-by: 180909 <734461790@qq.com>
* Follow PEP-8 guidelines in tutorial for standard library (GH-26127)Miss Islington (bot)2022-04-031-2/+3
| | | | | (cherry picked from commit 6db2db91b96aaa1270c200ec931a2250fe2799c7) Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
* docs: Don't use code formatting for emphasis (GH-30519)Miss Islington (bot)2022-03-081-1/+1
| | | | | (cherry picked from commit badb637c8ce91625122d5f4d71276bfe1a8ed5e9) Co-authored-by: William Andrea <william.j.andrea@gmail.com>
* bpo-34538: Remove Exception subclassing from tutorial (GH-30361)Miss Islington (bot)2022-01-031-35/+1
| | | | | | | | | | Remove the bit about subclassing exceptions. Documentation PR can skip the NEWS label. Automerge-Triggered-By: GH:iritkatriel (cherry picked from commit 2db56130631255ca2eb504519430fb2f1fe789e9) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* bpo-46079: Replace external link that is down for maintenance. (GH-30315) ↵Miss Islington (bot)2022-01-011-6/+6
| | | | (GH-30329)
* Fix the output of built-in iter() function example in Iterators (Section ↵Miss Islington (bot)2021-12-161-1/+1
| | | | | | | | 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 c5d18a5014f649368b5a4bca94e9ec7d2908b481) Co-authored-by: Vivek Vashist <vivekvashist@gmail.com>
* bpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896)Miss Islington (bot)2021-12-041-1/+1
| | | | | | (cherry picked from commit 9f2f7e42269db74a89fc8cd74d82a875787f01d7) Co-authored-by: Zachary Ware <zach@python.org>
* bpo-34451: Document prompt and output toggle feature in html tutorial ↵Miss Islington (bot)2021-10-211-0/+7
| | | | | | | (GH-27105) (GH-29120) (cherry picked from commit 5a14f71fe869d4a62dcdeb9a8fbbb5884c75060c) Co-authored-by: Thomas <thmsdnnr@gmail.com>
* [doc] Update references to NumPy (GH-22458) (GH-28749)Miss Islington (bot)2021-10-061-1/+1
| | | | | | Numeric(al) Python to NumPy. It seems the old name hasn't been used for some time. (cherry picked from commit c8bb24166e367d449158015cb9b1093f03c7175d) Co-authored-by: Andre Delfino <adelfino@gmail.com>
* bpo-38623: Add note about site module (site-packages) (GH-16974) (GH-28537)Miss Islington (bot)2021-09-231-1/+2
| | | | | (cherry picked from commit 55b45bf707c6c8084db259fe2f8aa08e84ea0d99) Co-authored-by: Peter Bittner <django@bittner.it>
* bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28524)Miss Islington (bot)2021-09-231-1/+1
| | | | | | | | | | 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 36122e18148c5b6c78ebce1d36d514fd7cf250f5) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-44966: Fix out-of-date traceback message (GH-27867) (GH-27876)Miss Islington (bot)2021-08-221-1/+1
|
* introduce omitted index default before using it (GH-27775) (GH-27803)Miss Islington (bot)2021-08-171-8/+8
| | | | | (cherry picked from commit 599f5c8481ca258ca3a5d13eaee7d07a9103b5f2) Co-authored-by: Jefferson Oliveira <jefferson.dev.insights@gmail.com>
* bpo-44907: Update error messages in tutorial examples (GH-27755)Miss Islington (bot)2021-08-141-3/+3
| | | | | | | (cherry picked from commit ed524b4569b1e4a166886c880018418d46284378) Co-authored-by: meowmeowmeowcat <meowmeowcat1211@gmail.com>
* bpo-40620: Clarify tutorial controlflow.rst ``range`` examples (GH-26919) ↵Miss Islington (bot)2021-06-271-14/+8
| | | | | | | (GH-26928) (cherry picked from commit 2f49c9debc2efe010c757be3bdbd6493f1ebc5f6) Co-authored-by: jdevries3133 <58614260+jdevries3133@users.noreply.github.com>
* bpo-43927: Change 'IOError' to 'OSError' (GH-26289)Miss Islington (bot)2021-05-211-1/+1
| | | | | | This is the last remaining instance, at least for this chapter, in 3.10 & 3.11. (cherry picked from commit 2f47d8dcc735234bf9c7f92fbdacd8c5a6ee7761) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411) ↵Miss Islington (bot)2021-05-191-1/+2
| | | | | | | | (GH-26219) (cherry picked from commit 4fdcc39f711e1b586a94e2c5088fdd7e78fd9f58) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-43729: Clarify comment in tutorial example (GH-25191) (GH-26137)Miss Islington (bot)2021-05-141-1/+1
| | | | | | | (cherry picked from commit 07797121cc290ede0b3d3cf02068f3d993cddd15) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-40640: doc -- add missing ... in example of Continue (GH-26055) (GH-26058)Miss Islington (bot)2021-05-121-0/+1
| | | | | | Co-authored-by: Chas Belov <59780179+ChasBelov@users.noreply.github.com> (cherry picked from commit 6574334a68aa324394a6fd1f855ecbad20432b1e)
* bpo-32822: Add finally with return/break/continue to the tutorial (GH-25600) ↵Miss Islington (bot)2021-05-041-0/+4
| | | | | | | | | | (#25890) 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 a0b9915a8be98427432e13d8eb2207a8b9824179) Co-authored-by: Roberto Hueso <robertohueso96@gmail.com>
* bpo-42589: Change URL for 'from' link when used in a raised exception (GH-23872)Miss Islington (bot)2021-04-291-1/+1
| | | | | | | | 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. (cherry picked from commit 2fd928c8c1328424130cb9c51fc02ad5f9a66328) Co-authored-by: sblondon <sblondon@users.noreply.github.com>
* bpo-43777: Drop description of "pip search" command from tutorial (GH-25287)Miss Islington (bot)2021-04-141-13/+2
| | | | | (cherry picked from commit 133705b85cc25d1e6684d32f8943ca288fadfda0) Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
* bpo-43325: Add FAQ entry for identity tests (GH-25168) (GH-25178)Miss Islington (bot)2021-04-041-3/+2
|
* bpo-39231: correct tutorial annotations section (GH-25029)Miss Islington (bot)2021-03-271-1/+1
| | | | | (cherry picked from commit a53e9a7cf5912a44c5143e353912e44cfcfca7dc) Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
* bpo-43042: Augment tutorial sentence (GH-24514)Miss Islington (bot)2021-02-201-1/+2
| | | | | | Calling same function also gets new local namespace. (cherry picked from commit b30fcba3a8abaabd1087f2392ae8aec4c1b1f210) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.9] bpo-17852: Doc: Fix the tutorial about closing files (GH-23135) (GH-23527)Miss Islington (bot)2020-12-011-5/+10
| | | | | | | Co-authored-by: Inada Naoki <songofacandy@gmail.com> (cherry picked from commit c8aaf71dde4888864c0c351e2f935f87652c3d54) Co-authored-by: Volker-Weissmann <39418860+Volker-Weissmann@users.noreply.github.com>
* bpo-42489: Fix the signature for list.sort() in the tutorial (GH-23538)Miss Islington (bot)2020-11-281-1/+1
| | | | | (cherry picked from commit d41ec65ab7411e877ca33d05e8c900feca530635) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162)Miss Islington (bot)2020-11-061-9/+10
| | | | | (cherry picked from commit bde33e428d5b5f88ec7667598fd27d1091840537) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-41776: Revise example of "continue" in the tutorial documentation ↵Miss Islington (bot)2020-09-151-5/+5
| | | | | | | | | | (GH-22234) (GH-22255) Revise example of "continue" in the tutorial documentation (cherry picked from commit 7bcc6456ad4704da9b287c8045768fa53961adc5) Co-authored-by: Neeraj Samtani <neerajjsamtani@gmail.com> Co-authored-by: Neeraj Samtani <neerajjsamtani@gmail.com>
* Fix grammar in Doc/tutorial/controlflow.rst (GH-21885) (#21922)Miss Islington (bot)2020-08-221-1/+1
| | | | | | | Automerge-Triggered-By: @csabella (cherry picked from commit 0be7c216e16f0d459f1c8f6209734c9b2b82fbd4) Co-authored-by: Denis Ovsienko <denis@ovsienko.info>
* [3.9] bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901)Victor Stinner2020-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the c_warn_on_allowed_pre_v3 option to make the documentation compatible with Sphinx 2 and Sphinx 3. (cherry picked from commit 423e77d6de497931585d1883805a9e3fa4096b0b) * bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858) Use generic '.. object::' to declare markers, rather than abusing '.. c:function::' which fails on Sphinx 3. (cherry picked from commit 43577c01a2ab49122db696e9eaec6cb31d11cc81) * bpo-40204: Fix duplicates in the documentation (GH-21857) Fix two Sphinx 3 issues: Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'. Declaration is 'PyBUF_ND'. Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'. Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'. (cherry picked from commit 46d10b1237c67ff8347f533eda6a5468d098f7eb) * bpo-40204: Add :noindex: in the documentation (GH-21859) Add :noindex: to duplicated documentation to fix "duplicate object description" errors. For example, fix this Sphinx 3 issue: Doc/library/configparser.rst:1146: WARNING: duplicate object description of configparser.ConfigParser.optionxform, other instance in library/configparser, use :noindex: for one of them (cherry picked from commit d3ded080482beae578faa704b13534a62d066f9f) * bpo-40204, doc: Fix syntax of C variables (GH-21846) For example, fix the following Sphinx 3 errors: Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters Invalid C declaration: Expected identifier in nested name. [error at 5] void \*obj -----^ Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*' Invalid C declaration: Expected end of definition. [error at 8] PyObject* --------^ The modified documentation is compatible with Sphinx 2 and Sphinx 3. (cherry picked from commit 474652fe9346382dbf793f20b671eb74668bebde) * 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. (cherry picked from commit bb0b08540cc93e56f3f1bde1b39ce086d9e35fe1) * bpo-40204: Fix duplicated productionlist names in the doc (GH-21900) Sphinx 3 disallows having more than one productionlist markup with the same name. Simply remove names in this case, since names are not shown anyway. For example, fix the Sphinx 3 warning: Doc/reference/introduction.rst:96: duplicate token description of *:name, other instance in reference/expressions (cherry picked from commit 1abeda80f760134b4233608e2c288790f955b95a)
* Fix repeated words in Classes tutorial (GH-21455)Miss Islington (bot)2020-07-141-2/+2
| | | | | | | | The phrase "At any time during execution," was repeated twice. Automerge-Triggered-By: @Mariatta (cherry picked from commit 4f28f75deefc6e8f65694f96f1a40b0a26fc385d) Co-authored-by: Paul McMillan <paul@mcmillan.ws>
* bpo-28681: Clarify multiple function names in the tutorial (GH-21340) (GH-21343)Miss Islington (bot)2020-07-061-5/+4
| | | | | | | | | | | | | | * improve control flow docs * Add also Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit d12af71047f0eae86440654d3ea74c032c7c3558) Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com> Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
* bpo-26205: Specify the number of nested scopes (GH-21324) (GH-21341)Miss Islington (bot)2020-07-061-2/+2
| | | | | | | | | | | | | | * 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> (cherry picked from commit 9ed3cd8ba052b395ab50692bb65988b065d68e27) Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com> Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
* Improve IO tutorial's "Old string formatting" section (GH-16251)Miss Islington (bot)2020-05-281-5/+5
| | | | | | | | * 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> (cherry picked from commit eaca2aa117d663acf8160a0b4543ee2c7006fcc7) Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
* bpo-39705 : sorted() tutorial example under looping techniques improved ↵Rahul Kumaresan2020-05-181-0/+15
| | | | (GH-18999)
* Change 'exception happened' to 'exception occurred' in two places (#19767)Noah Doersing2020-05-011-1/+1
|
* bpo-39869: Fix typo in 'Instance objects' section. (GH-18889)Antoine2020-03-101-1/+1
|
* Grammar fix in tutorial (GH-18425)Don Kirkby2020-02-101-1/+1
|
* bpo-39534: Doc: Clarify return in finally (GH-18324)Julien Palard2020-02-061-9/+27
|
* bpo-38558: Link to further docs from walrus operator mention in tutorial ↵Adorilson Bezerra2020-02-031-3/+4
| | | | (GH-16973)
* bpo-39431: Also mention nonlocal in assignment quirk (GH-17375)Shanavas M2020-01-231-4/+4
|
* bpo-38678: Improve argparse example in tutorial (GH-17207)Raymond Hettinger2019-11-181-15/+17
|
* Update interpreter.rst (GH-17059)Jules Lasne (jlasne)2019-11-051-1/+1
| | | Fixed what seemed to be a weird phrasing.
* bpo-38558: Mention `:=` in conditions tutorial (GH-16919)Ammar Askar2019-10-251-4/+4
|
* bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016)Mohammad Dehghan2019-09-261-1/+1
| | | | Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>