mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
#11317: fix wrong info about string exceptions.
This commit is contained in:
parent
d0a54d0915
commit
2682661cbc
1 changed files with 5 additions and 9 deletions
|
|
@ -610,14 +610,10 @@ Notes:
|
||||||
.. versionadded:: 2.5
|
.. versionadded:: 2.5
|
||||||
|
|
||||||
|
|
||||||
Deprecation of String Exceptions
|
String Exceptions
|
||||||
================================
|
=================
|
||||||
|
|
||||||
.. index:: single: BaseException (built-in exception)
|
.. versionchanged:: 2.6
|
||||||
|
All exceptions to be raised or caught must be derived from :exc:`BaseException`.
|
||||||
All exceptions built into Python or provided in the standard library are derived
|
Trying to raise a string exception now raises :exc:`TypeError`.
|
||||||
from :exc:`BaseException`.
|
|
||||||
|
|
||||||
String exceptions are still supported in the interpreter to allow existing code
|
|
||||||
to run unmodified, but this will also change in a future release.
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue