f336df0575
Doc: Fix errors in documentation examples (GH-160742)
...
(cherry picked from commit 085d3665b1 )
Co-authored-by: Inada Naoki <[email protected] >
Co-authored-by: Stan Ulbrych <[email protected] >
2026-10-27 11:02:44 +00:00
abd276ab3d
[3.14] docs: fix f-string in ExceptionGroup example (GH-146108) (GH-146126)
...
(cherry picked from commit 2c6afb935a )
Co-authored-by: Bartosz Grabowski <[email protected] >
2026-03-24 00:09:00 +01:00
b5e5013378
[3.14] Docs: except with multiple exceptions parentheses not required (GH-145848) ( #145904 )
...
Docs: except with multiple exceptions parentheses not required (GH-145848)
As of PEP 758 the except statement doesn't require parentheses anymore for exception tuples.
(cherry picked from commit 6d1e9ceed3 )
See: https://peps.python.org/pep-0758/
Co-authored-by: Maurizio Sambati <[email protected] >
2026-03-13 06:12:02 -04:00
Irit Katriel and GitHub
ffc2f1dd1c
gh-130080: implement PEP 765 ( #130087 )
2025-03-17 20:48:54 +00:00
30d5205849
gh-116666: Add "token" glossary term (GH-130888)
...
Add glossary entry for `token`, and link to it.
Avoid talking about tokens in the SyntaxError intro (errors.rst); at this point
tokenization is too much of a technical detail. (Even to an advanced reader,
the fact that a *single* token is highlighted isn't too relevant. Also, we don't
need to guarantee that it's a single token.)
Co-authored-by: Adam Turner <[email protected] >
2025-03-17 17:05:47 +01:00
funkyrailroad and GitHub
26ff32b305
gh-127265: Remove single quotes from 'arrow's in tutorial/errors.rst (GH-127267)
2024-11-25 15:34:01 -06:00
Bogdana Vereha and GitHub
a78d5b3242
Fix a typo in `Doc/tutorial/errors.rst` exception output ( #126001 )
2024-10-26 18:26:35 +03:00
Rafael Fontenelle and GitHub
39612103dd
Update to 3.13 the output of exceptions raised ( #123888 )
2024-09-13 15:17:30 +00:00
Nice Zombies and GitHub
a05068db0c
gh-117597: Clarify exception handling in the tutorial ( #117681 )
2024-04-09 20:59:45 +00:00
Terry Jan Reedy and GitHub
3e45030076
gh-116563: Update tutorial error example ( #116569 )
...
There now may be multiple carets pointing at a token
rather than just a character. Fix the sentence about
possible causes.
2024-03-11 18:01:08 -04:00
a6d25de375
gh-110383: Explained which error message is generated when there is an unhandled exception ( #111574 )
...
Co-authored-by: Hugo van Kemenade <[email protected] >
2023-11-19 05:20:10 -07:00
Serhiy Storchaka and GitHub
f2d07d3289
gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386)
2023-07-29 08:48:10 +03:00
Joe Kaufeld and GitHub
ed491d9f78
Reformat code block to make it easier to read ( #106965 )
2023-07-22 14:19:30 +02:00
C.A.M. Gerlach and GitHub
38aa89a52e
Doc: Add missing ref labels to exception groups/notes sections ( #106465 )
2023-07-05 23:41:04 -06:00
Jens-Hilmar Bradt and GitHub
8709697292
[doc] Fix error in tutorial example: type(exc) is the type rather than the instance ( #102751 )
2023-03-22 18:43:41 +00:00
Doj and GitHub
586b07e1f9
[doc] fix typo (GH-99143)
2022-11-05 21:03:29 +00:00
Shahriar Heidrich and GitHub
395b66a0ae
gh-97654: Add auto exception chaining example to tutorial ( #97703 )
...
Add auto exception chaining example to tutorial
2022-10-04 17:36:04 -07:00
Irit Katriel and GitHub
f92bcfe6de
gh-89770: [PEP-678] add exception notes to tutorial (GH-30441)
2022-04-20 13:43:10 +01:00
Irit Katriel and GitHub
04f9658c59
gh-90449: Improve accuracy and readability of exceptions tutorial (GH-31899)
2022-04-13 21:45:33 +01:00
Irit Katriel and GitHub
c590b581bb
bpo-46328: Add sys.exception() (GH-30514)
2022-01-13 12:35:58 +00:00
Irit Katriel and GitHub
9925e70e48
bpo-45292: [PEP-654] exception groups and except* documentation (GH-30158)
2022-01-06 19:05:34 +00:00
Hugo van Kemenade and GitHub
2db5613063
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
2022-01-03 14:52:09 -08:00
Raymond Hettinger and GitHub
15a64d89a3
bpo-44966: Fix out-of-date traceback message (GH-27867)
2021-08-21 13:59:18 -05:00
Thomas Grainger and GitHub
e9a6f1b78b
bpo-41576: document BaseException in favor of bare except (GH-21917)
2021-08-06 22:44:15 +02:00
Terry Jan Reedy and GitHub
2f47d8dcc7
bpo-43927: Change 'IOError' to 'OSError' (GH-26289)
...
This is the last remaining instance, at least for this chapter, in 3.10 & 3.11.
2021-05-21 13:54:01 -04:00
Roberto Hueso and GitHub
a0b9915a8b
bpo-32822: Add finally with return/break/continue to the tutorial ( #25600 )
...
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.
2021-05-04 14:36:01 +02:00
sblondon and GitHub
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
Adorilson Bezerra and GitHub
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 and GitHub
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
Inada Naoki and GitHub
bde33e428d
bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162)
2020-11-06 11:45:01 +09:00
Noah Doersing and GitHub
8bcfd31cc0
Change 'exception happened' to 'exception occurred' in two places ( #19767 )
2020-04-30 21:30:10 -07:00
Julien Palard and GitHub
446463f8db
bpo-39534: Doc: Clarify return in finally (GH-18324)
2020-02-06 23:16:48 +01:00
1ad7be2f16
bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016)
...
Co-Authored-By: Ashwin Ramaswami <[email protected] >
2019-09-26 11:09:05 +02:00
Jason Plurad and Stéphane Wirtel
9ab6038fe8
Doc: Corrected syntax for return annotation (GH-16265)
...
Signed-off-by: Jason Plurad <[email protected] >
2019-09-19 07:24:29 +02:00
toonarmycaptain and Stéphane Wirtel
0cc27417f2
Improve clarity of try-return-finally-return (GH-15677)
...
Clarify execution in try-return-finally-return case.
2019-09-11 17:37:13 +02:00
Abhilash Raj and Miss Islington (bot)
dcfe111eb5
bpo-37826: Document exception chaining in Python tutorial for errors. (GH-15243)
...
https://bugs.python.org/issue37826
2019-08-14 14:11:32 -07:00
Serhiy Storchaka and GitHub
2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)
2018-12-19 08:09:46 +02:00
İsmail Arılık and Serhiy Storchaka
fe62d877e3
Fix a typo about a comma. (GH-10306)
2018-11-03 17:05:59 +02:00
Kushal Das
ecbca357c9
Closes #28713 uses OSError in the tutorial
2016-11-16 21:13:43 +05:30
Berker Peksag
cea632ece5
Issue #21864 : Remove outdated section about exceptions from the tutorial
...
Move the still relevant parts of it to the previous
chapter, "Errors and Exceptions".
2016-11-06 21:15:01 +03:00
Terry Jan Reedy
30eee4deec
Issue #28815 : Change '?' to '<module>' in some doc examples.
...
Patch by Mariatta Wijaya.
2016-09-30 15:38:48 -04:00
Berker Peksag
cf79cdb79d
Issue #28306 : Update exception message of ZeroDivisionError
2016-09-28 22:48:57 +03:00
Raymond Hettinger
7f65af3d2d
Issue 27719: Remove a doc example that is not applicable in Python 3
2016-08-12 09:43:59 -07:00
Serhiy Storchaka
dba903993a
Issue #23921 : Standardized documentation whitespace formatting.
...
Original patch by James Edwards.
2016-05-10 12:01:23 +03:00
Martin Panter
7462b64911
Issue #25523 : Correct "a" article to "an" article
...
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
2015-11-02 03:37:02 +00:00
Andrew Svetlov
08af00047b
Get rid of deprecated IOError in the doc
2014-04-01 01:13:30 +03:00
Georg Brandl
53bf15af47
Fix ZeroDivisionError message (reported by Pavel Fedotov on docs@)
2013-10-06 09:11:14 +02:00
Andrew Svetlov
09974b4e9e
Drop double newlines printed in some file iteration examples.
...
Patch by Steven Kryskalla.
2012-12-08 17:59:03 +02:00
Georg Brandl
ee8783d0fc
Merged revisions 74817-74820,74822-74824 via svnmerge from
...
svn+ssh://[email protected] /python/trunk
........
r74817 | georg.brandl | 2009-09-16 11:05:11 +0200 (Mi, 16 Sep 2009) | 1 line
Make deprecation notices as visible as warnings are right now.
........
r74818 | georg.brandl | 2009-09-16 11:23:04 +0200 (Mi, 16 Sep 2009) | 1 line
#6880 : add reference to classes section in exceptions section, which comes earlier.
........
r74819 | georg.brandl | 2009-09-16 11:24:57 +0200 (Mi, 16 Sep 2009) | 1 line
#6876 : fix base class constructor invocation in example.
........
r74820 | georg.brandl | 2009-09-16 11:30:48 +0200 (Mi, 16 Sep 2009) | 1 line
#6891 : comment out dead link to Unicode article.
........
r74822 | georg.brandl | 2009-09-16 12:12:06 +0200 (Mi, 16 Sep 2009) | 1 line
#5621 : refactor description of how class/instance attributes interact on a.x=a.x+1 or augassign.
........
r74823 | georg.brandl | 2009-09-16 15:06:22 +0200 (Mi, 16 Sep 2009) | 1 line
Remove strange trailing commas.
........
r74824 | georg.brandl | 2009-09-16 15:11:06 +0200 (Mi, 16 Sep 2009) | 1 line
#6892 : fix optparse example involving help option.
........
2009-09-16 16:00:31 +00:00
Georg Brandl
397ad860e9
#4144 : fix output of console sessions.
2009-05-17 08:14:39 +00:00