|
1 | 1 | # -*- coding: utf-8 -*-
|
2 |
| -# Autogenerated by Sphinx on Thu Jan 13 19:37:48 2022 |
| 2 | +# Autogenerated by Sphinx on Thu Feb 3 18:35:23 2022 |
3 | 3 | topics = {'assert': 'The "assert" statement\n'
|
4 | 4 | '**********************\n'
|
5 | 5 | '\n'
|
|
2518 | 2518 | ' >>> print(sys.exc_info())\n'
|
2519 | 2519 | ' (None, None, None)\n'
|
2520 | 2520 | '\n'
|
2521 |
| - 'The "except*" clause(s) are used for handling "ExceptionGroup`s. ' |
| 2521 | + 'The "except*" clause(s) are used for handling "ExceptionGroup"s. ' |
2522 | 2522 | 'The\n'
|
2523 |
| - 'exception type for matching is interpreted as in the case of\n' |
2524 |
| - ':keyword:`except", but in the case of exception groups we can ' |
2525 |
| - 'have\n' |
2526 |
| - 'partial matches when the type matches some of the exceptions in ' |
2527 |
| - 'the\n' |
2528 |
| - 'group. This means that multiple except* clauses can execute, ' |
2529 |
| - 'each\n' |
2530 |
| - 'handling part of the exception group. Each clause executes once ' |
2531 |
| - 'and\n' |
2532 |
| - 'handles an exception group of all matching exceptions. Each ' |
2533 |
| - 'exception\n' |
2534 |
| - 'in the group is handled by at most one except* clause, the first ' |
| 2523 | + 'exception type for matching is interpreted as in the case of ' |
| 2524 | + '"except",\n' |
| 2525 | + 'but in the case of exception groups we can have partial matches ' |
| 2526 | + 'when\n' |
| 2527 | + 'the type matches some of the exceptions in the group. This means ' |
2535 | 2528 | 'that\n'
|
2536 |
| - 'matches it.\n' |
| 2529 | + 'multiple except* clauses can execute, each handling part of the\n' |
| 2530 | + 'exception group. Each clause executes once and handles an ' |
| 2531 | + 'exception\n' |
| 2532 | + 'group of all matching exceptions. Each exception in the group ' |
| 2533 | + 'is\n' |
| 2534 | + 'handled by at most one except* clause, the first that matches ' |
| 2535 | + 'it.\n' |
2537 | 2536 | '\n'
|
2538 | 2537 | ' >>> try:\n'
|
2539 | 2538 | ' ... raise ExceptionGroup("eg",\n'
|
|
8082 | 8081 | '\n'
|
8083 | 8082 | ' The built-in fu
F438
nction "int()" falls back to '
|
8084 | 8083 | '"__trunc__()" if\n'
|
8085 |
| - ' neither "__int__()" nor "__index__()" is defined.\n', |
| 8084 | + ' neither "__int__()" nor "__index__()" is defined.\n' |
| 8085 | + '\n' |
| 8086 | + ' Changed in version 3.11: The delegation of "int()" to ' |
| 8087 | + '"__trunc__()"\n' |
| 8088 | + ' is deprecated.\n', |
8086 | 8089 | 'objects': 'Objects, values and types\n'
|
8087 | 8090 | '*************************\n'
|
8088 | 8091 | '\n'
|
|
8445 | 8448 | '\n'
|
8446 | 8449 | ' raise_stmt ::= "raise" [expression ["from" expression]]\n'
|
8447 | 8450 | '\n'
|
8448 |
| - 'If no expressions are present, "raise" re-raises the last ' |
8449 |
| - 'exception\n' |
8450 |
| - 'that was active in the current scope. If no exception is active ' |
8451 |
| - 'in\n' |
8452 |
| - 'the current scope, a "RuntimeError" exception is raised indicating\n' |
8453 |
| - 'that this is an error.\n' |
| 8451 | + 'If no expressions are present, "raise" re-raises the exception that ' |
| 8452 | + 'is\n' |
| 8453 | + 'currently being handled, which is also known as the *active\n' |
| 8454 | + 'exception*. If there isn’t currently an active exception, a\n' |
| 8455 | + '"RuntimeError" exception is raised indicating that this is an ' |
| 8456 | + 'error.\n' |
8454 | 8457 | '\n'
|
8455 | 8458 | 'Otherwise, "raise" evaluates the first expression as the exception\n'
|
8456 | 8459 | 'object. It must be either a subclass or an instance of\n'
|
|
8505 | 8508 | ' File "<stdin>", line 4, in <module>\n'
|
8506 | 8509 | ' RuntimeError: Something bad happened\n'
|
8507 | 8510 | '\n'
|
8508 |
| - 'A similar mechanism works implicitly if an exception is raised ' |
8509 |
| - 'inside\n' |
8510 |
| - 'an exception handler or a "finally" clause: the previous exception ' |
8511 |
| - 'is\n' |
8512 |
| - 'then attached as the new exception’s "__context__" attribute:\n' |
| 8511 | + 'A similar mechanism works implicitly if a new exception is raised ' |
| 8512 | + 'when\n' |
| 8513 | + 'an exception is already being handled. An exception may be ' |
| 8514 | + 'handled\n' |
| 8515 | + 'when an "except" or "finally" clause, or a "with" statement, is ' |
| 8516 | + 'used.\n' |
| 8517 | + 'The previous exception is then attached as the new exception’s\n' |
| 8518 | + '"__context__" attribute:\n' |
8513 | 8519 | '\n'
|
8514 | 8520 | ' >>> try:\n'
|
8515 | 8521 | ' ... print(1 / 0)\n'
|
|
10995 | 11001 | 'if\n'
|
10996 | 11002 | ' neither "__int__()" nor "__index__()" is defined.\n'
|
10997 | 11003 | '\n'
|
| 11004 | + ' Changed in version 3.11: The delegation of "int()" to ' |
| 11005 | + '"__trunc__()"\n' |
| 11006 | + ' is deprecated.\n' |
| 11007 | + '\n' |
10998 | 11008 | '\n'
|
10999 | 11009 | 'With Statement Context Managers\n'
|
11000 | 11010 | '===============================\n'
|
@@ -12562,17 +12572,16 @@
|
12562 | 12572 | ' >>> print(sys.exc_info())\n'
|
12563 | 12573 | ' (None, None, None)\n'
|
12564 | 12574 | '\n'
|
12565 |
| - 'The "except*" clause(s) are used for handling "ExceptionGroup`s. The\n' |
12566 |
| - 'exception type for matching is interpreted as in the case of\n' |
12567 |
| - ':keyword:`except", but in the case of exception groups we can have\n' |
12568 |
| - 'partial matches when the type matches some of the exceptions in the\n' |
12569 |
| - 'group. This means that multiple except* clauses can execute, each\n' |
12570 |
| - 'handling part of the exception group. Each clause executes once and\n' |
12571 |
| - 'handles an exception group of all matching exceptions. Each ' |
12572 |
| - 'exception\n' |
12573 |
| - 'in the group is handled by at most one except* clause, the first ' |
| 12575 | + 'The "except*" clause(s) are used for handling "ExceptionGroup"s. The\n' |
| 12576 | + 'exception type for matching is interpreted as in the case of ' |
| 12577 | + '"except",\n' |
| 12578 | + 'but in the case of exception groups we can have partial matches when\n' |
| 12579 | + 'the type matches some of the exceptions in the group. This means ' |
12574 | 12580 | 'that\n'
|
12575 |
| - 'matches it.\n' |
| 12581 | + 'multiple except* clauses can execute, each handling part of the\n' |
| 12582 | + 'exception group. Each clause executes once and handles an exception\n' |
| 12583 | + 'group of all matching exceptions. Each exception in the group is\n' |
| 12584 | + 'handled by at most one except* clause, the first that matches it.\n' |
12576 | 12585 | '\n'
|
12577 | 12586 | ' >>> try:\n'
|
12578 | 12587 | ' ... raise ExceptionGroup("eg",\n'
|
|
0 commit comments