Commit Graph

650 Commits

Author SHA1 Message Date
Miss Islington (bot) 0dd32b52c7
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:50:28 -07:00
Miss Islington (bot) 4a2337fe33
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:13:43 -07:00
Miss Islington (bot) d05ee916c1
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:45 -07:00
Miss Islington (bot) c6c9823455
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:40:14 -07:00
Miss Islington (bot) 0d0a6f18a0
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:58:21 -07:00
Miss Islington (bot) 24ebaf6323
docs: Don't use code formatting for emphasis (GH-30519)
(cherry picked from commit badb637c8c)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
2022-03-07 20:35:54 -08:00
Miss Islington (bot) 4affb996ce
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:19:29 -08:00
Miss Islington (bot) 72ffcb02f3
bpo-46079: Replace external link that is down for maintenance. (GH-30315) (GH-30329) 2022-01-01 10:13:31 -08:00
Miss Islington (bot) 309614f1f7
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:04:53 -08:00
Miss Islington (bot) 257eea5586
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-04 00:28:30 -05:00
Miss Islington (bot) bfa4237ecf
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105) (GH-29120)
(cherry picked from commit 5a14f71fe8)

Co-authored-by: Thomas <thmsdnnr@gmail.com>
2021-10-21 14:42:10 +02:00
Miss Islington (bot) d747f5e805
[doc] Update references to NumPy (GH-22458) (GH-28749)
Numeric(al) Python to NumPy. It seems the old name hasn't been used for some time.
(cherry picked from commit c8bb24166e)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-10-06 15:04:48 +02:00
Miss Islington (bot) d672dd34f0
bpo-38623: Add note about site module (site-packages) (GH-16974) (GH-28537)
(cherry picked from commit 55b45bf707)

Co-authored-by: Peter Bittner <django@bittner.it>
2021-09-24 00:48:26 +02:00
Miss Islington (bot) f1d5cdef57
bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28524)
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:57 +03:00
Miss Islington (bot) 407b3e0bb0
bpo-44966: Fix out-of-date traceback message (GH-27867) (GH-27876) 2021-08-21 19:36:54 -05:00
Miss Islington (bot) 1bc05419b8
introduce omitted index default before using it (GH-27775) (GH-27803)
(cherry picked from commit 599f5c8481)

Co-authored-by: Jefferson Oliveira <jefferson.dev.insights@gmail.com>
2021-08-17 23:49:53 +02:00
Miss Islington (bot) 43bab0537c
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:38 -04:00
Miss Islington (bot) 1acd1e6385
bpo-40620: Clarify tutorial controlflow.rst ``range`` examples (GH-26919) (GH-26928)
(cherry picked from commit 2f49c9debc)

Co-authored-by: jdevries3133 <58614260+jdevries3133@users.noreply.github.com>
2021-06-27 20:52:32 +01:00
Miss Islington (bot) e10bd76d47
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:17:10 -07:00
Miss Islington (bot) 74eb94af2b
bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411) (GH-26219)
(cherry picked from commit 4fdcc39f71)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2021-05-19 09:59:36 +01:00
Miss Islington (bot) c90642b0d4
bpo-43729: Clarify comment in tutorial example (GH-25191) (GH-26137)
(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:34 -07:00
Miss Islington (bot) ada9cdb941
bpo-40640: doc -- add missing ... in example of Continue (GH-26055) (GH-26058)
Co-authored-by: Chas Belov <59780179+ChasBelov@users.noreply.github.com>
(cherry picked from commit 6574334a68)
2021-05-12 11:28:10 +01:00
Miss Islington (bot) 91cb1e20e6
bpo-32822: Add finally with return/break/continue to the tutorial (GH-25600) (#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 a0b9915a8b)

Co-authored-by: Roberto Hueso <robertohueso96@gmail.com>
2021-05-04 15:17:21 +02:00
Miss Islington (bot) 3eaa6f9d18
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.
(cherry picked from commit 2fd928c8c1)

Co-authored-by: sblondon <sblondon@users.noreply.github.com>
2021-04-29 11:26:26 -07:00
Miss Islington (bot) 57873af35a
bpo-43777: Drop description of "pip search" command from tutorial (GH-25287)
(cherry picked from commit 133705b85c)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
2021-04-13 22:34:39 -07:00
Miss Islington (bot) de0b2b1330
bpo-43325: Add FAQ entry for identity tests (GH-25168) (GH-25178) 2021-04-03 20:05:50 -07:00
Miss Islington (bot) 7990072999
bpo-39231: correct tutorial annotations section (GH-25029)
(cherry picked from commit a53e9a7cf5)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2021-03-27 10:43:08 -07:00
Miss Islington (bot) a67fd011ea
bpo-43042: Augment tutorial sentence (GH-24514)
Calling same function also gets new local namespace.
(cherry picked from commit b30fcba3a8)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-02-19 16:46:57 -08:00
Miss Islington (bot) 4a44f53aa8
[3.9] bpo-17852: Doc: Fix the tutorial about closing files (GH-23135) (GH-23527)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
(cherry picked from commit c8aaf71dde)


Co-authored-by: Volker-Weissmann <39418860+Volker-Weissmann@users.noreply.github.com>
2020-12-01 02:53:42 -08:00
Miss Islington (bot) cc5eb935c7
bpo-42489: Fix the signature for list.sort() in the tutorial (GH-23538)
(cherry picked from commit d41ec65ab7)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-11-28 07:14:23 -08:00
Miss Islington (bot) e74fb2d766
bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162)
(cherry picked from commit bde33e428d)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2020-11-05 19:05:57 -08:00
Miss Islington (bot) 0cc037f8a7
bpo-41776: Revise example of "continue" in the tutorial documentation (GH-22234) (GH-22255)
Revise example of "continue" in the tutorial documentation
(cherry picked from commit 7bcc6456ad)

Co-authored-by: Neeraj Samtani <neerajjsamtani@gmail.com>

Co-authored-by: Neeraj Samtani <neerajjsamtani@gmail.com>
2020-09-15 09:56:28 -04:00
Miss Islington (bot) 72d5ddb930
Fix grammar in Doc/tutorial/controlflow.rst (GH-21885) (#21922)
Automerge-Triggered-By: @csabella
(cherry picked from commit 0be7c216e1)

Co-authored-by: Denis Ovsienko <denis@ovsienko.info>
2020-08-22 05:08:02 -04:00
Victor Stinner 8f88190af5
[3.9] bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901)
* 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 423e77d6de)

* 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 43577c01a2)

* 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 46d10b1237)

* 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 d3ded08048)

* 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 474652fe93)

* 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 bb0b08540c)

* 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 1abeda80f7)
2020-08-19 19:25:22 +02:00
Miss Islington (bot) 805874a9f1
Fix repeated words in Classes tutorial (GH-21455)
The phrase "At any time during execution," was repeated twice.

Automerge-Triggered-By: @Mariatta
(cherry picked from commit 4f28f75dee)

Co-authored-by: Paul McMillan <paul@mcmillan.ws>
2020-07-13 18:49:56 -07:00
Miss Islington (bot) 00c09f06a4
bpo-28681: Clarify multiple function names in the tutorial (GH-21340) (GH-21343)
* 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 d12af71047)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2020-07-05 23:07:32 -03:00
Miss Islington (bot) 3f4a9fd912
bpo-26205: Specify the number of nested scopes (GH-21324) (GH-21341)
* 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 9ed3cd8ba0)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2020-07-05 23:06:16 -03:00
Miss Islington (bot) d23ee5d652
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>
(cherry picked from commit eaca2aa117)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2020-05-27 18:41:38 -07: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
Antoine e5e56328af
bpo-39869: Fix typo in 'Instance objects' section. (GH-18889) 2020-03-10 07:17:40 -07:00
Don Kirkby 3ed4d25158
Grammar fix in tutorial (GH-18425) 2020-02-09 19:57:46 -05:00
Julien Palard 446463f8db
bpo-39534: Doc: Clarify return in finally (GH-18324) 2020-02-06 23:16:48 +01:00
Adorilson Bezerra 5807efd4c3
bpo-38558: Link to further docs from walrus operator mention in tutorial (GH-16973) 2020-02-03 18:11:19 +01:00
Shanavas M 7142df5ea2 bpo-39431: Also mention nonlocal in assignment quirk (GH-17375) 2020-01-23 13:09:21 -05:00
Raymond Hettinger 04c79d6088
bpo-38678: Improve argparse example in tutorial (GH-17207) 2019-11-17 22:06:19 -08:00
Jules Lasne (jlasne) 5e01a6542a Update interpreter.rst (GH-17059)
Fixed what seemed to be a weird phrasing.
2019-11-05 14:20:38 +01:00
Ammar Askar cb2cf06b0a bpo-38558: Mention `:=` in conditions tutorial (GH-16919) 2019-10-25 17:20:05 -05:00
Mohammad Dehghan 1ad7be2f16 bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016)
Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
2019-09-26 11:09:05 +02:00
Jason Plurad 9ab6038fe8 Doc: Corrected syntax for return annotation (GH-16265)
Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
2019-09-19 07:24:29 +02:00