Commit graph

48 commits

Author SHA1 Message Date
Irit Katriel c590b581bb
bpo-46328: Add sys.exception() (GH-30514) 2022-01-13 12:35:58 +00:00
Irit Katriel 9925e70e48
bpo-45292: [PEP-654] exception groups and except* documentation (GH-30158) 2022-01-06 19:05:34 +00:00
Hugo van Kemenade 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 15a64d89a3
bpo-44966: Fix out-of-date traceback message (GH-27867) 2021-08-21 13:59:18 -05:00
Thomas Grainger e9a6f1b78b
bpo-41576: document BaseException in favor of bare except (GH-21917) 2021-08-06 22:44:15 +02:00
Terry Jan Reedy 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 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 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 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
Inada Naoki bde33e428d
bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162) 2020-11-06 11:45:01 +09:00
Noah Doersing 8bcfd31cc0
Change 'exception happened' to 'exception occurred' in two places (#19767) 2020-04-30 21:30:10 -07:00
Julien Palard 446463f8db
bpo-39534: Doc: Clarify return in finally (GH-18324) 2020-02-06 23:16:48 +01: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
toonarmycaptain 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 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 2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
İsmail Arılık 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://pythondev@svn.python.org/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
Georg Brandl 48310cd3f2 Remove trailing whitespace. 2009-01-03 21:18:54 +00:00
Benjamin Peterson 5478b47355 Merged revisions 66457-66459,66465-66468,66483-66485,66487-66491 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66457 | antoine.pitrou | 2008-09-13 15:30:30 -0500 (Sat, 13 Sep 2008) | 5 lines

  Issue #3850: Misc/find_recursionlimit.py was broken.

  Reviewed by A.M. Kuchling.
........
  r66458 | benjamin.peterson | 2008-09-13 17:54:43 -0500 (Sat, 13 Sep 2008) | 1 line

  fix a name issue; note all doc files should be encoded in utf8
........
  r66459 | benjamin.peterson | 2008-09-14 11:02:22 -0500 (Sun, 14 Sep 2008) | 1 line

  clarify that radix for int is not 'guessed'
........
  r66465 | skip.montanaro | 2008-09-14 21:03:05 -0500 (Sun, 14 Sep 2008) | 3 lines

  Review usage.  Fix a mistake in the new-style class definition.  Add a
  couple new definitions (CPython and virtual machine).
........
  r66466 | skip.montanaro | 2008-09-14 21:19:53 -0500 (Sun, 14 Sep 2008) | 2 lines

  Pick up a few more definitions from the glossary on the wiki.
........
  r66467 | benjamin.peterson | 2008-09-14 21:53:23 -0500 (Sun, 14 Sep 2008) | 1 line

  mention that object.__init__ no longer takes arbitrary args and kwargs
........
  r66468 | andrew.kuchling | 2008-09-15 08:08:32 -0500 (Mon, 15 Sep 2008) | 1 line

  Rewrite item a bit
........
  r66483 | georg.brandl | 2008-09-16 05:17:45 -0500 (Tue, 16 Sep 2008) | 2 lines

  Fix typo.
........
  r66484 | benjamin.peterson | 2008-09-16 16:20:28 -0500 (Tue, 16 Sep 2008) | 2 lines

  be less wordy
........
  r66485 | georg.brandl | 2008-09-17 03:45:54 -0500 (Wed, 17 Sep 2008) | 2 lines

  #3888: add some deprecated modules in whatsnew.
........
  r66487 | skip.montanaro | 2008-09-17 06:50:36 -0500 (Wed, 17 Sep 2008) | 2 lines

  usage
........
  r66488 | andrew.kuchling | 2008-09-17 07:57:04 -0500 (Wed, 17 Sep 2008) | 1 line

  Markup fixes
........
  r66489 | andrew.kuchling | 2008-09-17 07:58:22 -0500 (Wed, 17 Sep 2008) | 2 lines

  Remove comment about improvement: pystone is about the same, and
  the improvements seem to be difficult to quantify
........
  r66490 | andrew.kuchling | 2008-09-17 08:04:53 -0500 (Wed, 17 Sep 2008) | 1 line

  Note sqlite3 version; move item
........
  r66491 | benjamin.peterson | 2008-09-17 16:54:56 -0500 (Wed, 17 Sep 2008) | 1 line

  document compileall command flags
........
2008-09-17 22:25:09 +00:00
Georg Brandl f5f2630db6 #3525: 3.0 exception changes in tutorial. 2008-08-08 06:50:56 +00:00
Benjamin Peterson e6f00637be Merged revisions 63655 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r63655 | benjamin.peterson | 2008-05-25 19:54:22 -0500 (Sun, 25 May 2008) | 2 lines

  update the tutorial to use str.format
........
2008-05-26 01:03:56 +00:00
Neal Norwitz 752abd0d3c Convert a lot of print statements to print functions in docstrings,
documentation, and unused/rarely used functions.
2008-05-13 04:55:24 +00:00
Georg Brandl e6bcc9145e Remove many "versionchanged" items that didn't use the official markup,
but just some text embedded in the docs.

Also remove paragraph about implicit relative imports from tutorial.
2008-05-12 18:05:20 +00:00
Martin v. Löwis 250ad613f3 Bug #2565: The repr() of type objects now calls them 'class',
not 'type' - whether they are builtin types or not.
2008-04-07 05:43:42 +00:00
Christian Heimes 190d79e5c6 Merged revisions 60408-60440 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r60425 | raymond.hettinger | 2008-01-29 20:52:09 +0100 (Tue, 29 Jan 2008) | 1 line

  CallMethod is faster with a NULL third-argument than with an empty format string.
........
  r60431 | raymond.hettinger | 2008-01-30 01:01:07 +0100 (Wed, 30 Jan 2008) | 1 line

  Add isdisjoint() to the Set/MutableSet ABCs.
........
  r60432 | raymond.hettinger | 2008-01-30 01:08:31 +0100 (Wed, 30 Jan 2008) | 1 line

  MutableSets support a remove() method.
........
  r60433 | raymond.hettinger | 2008-01-30 01:51:58 +0100 (Wed, 30 Jan 2008) | 1 line

  Demonstrate new except/as syntax.
........
  r60440 | christian.heimes | 2008-01-30 12:32:37 +0100 (Wed, 30 Jan 2008) | 1 line

  Patch #1970 by Antoine Pitrou: Speedup unicode whitespace and linebreak detection. The speedup is about 25% for split() (571 / 457 usec) and 35% (175 / 127 usec )for splitlines()
........
2008-01-30 11:58:22 +00:00
Collin Winter d2e44df07a Revert r58075 (incorrect docs patch). 2007-09-27 21:28:21 +00:00
Collin Winter 58721bca11 Fix more raise statments in the docs. 2007-09-10 00:39:52 +00:00
Collin Winter c7526f5b3e More two-argument raise cleanup in the tutorial. 2007-09-10 00:36:57 +00:00
Collin Winter 1fc035ff63 Fix docs that imply that tuples in except clauses must be parenthesized. 2007-09-10 00:32:45 +00:00
Collin Winter 596d99aa63 Fix more two-arg raise statements. 2007-09-10 00:31:50 +00:00
Georg Brandl 6911e3ce3f Convert all print statements in the docs. 2007-09-04 07:15:32 +00:00
Guido van Rossum 0616b792ba Tutorial update for 3.0 by Paul Dubois.
I had to fix a few markup issues in controlflow.rst and modules.rst.

There's a unicode issue on line 448 in introduction.rst that someone else needs to fix.
2007-08-31 03:25:11 +00:00
Georg Brandl e9af284e99 No need to define raw_input(), input() does the same. 2007-08-17 05:54:09 +00:00
Georg Brandl 116aa62bf5 Move the 3k reST doc tree in place. 2007-08-15 14:28:22 +00:00