|
1 | 1 | # -*- coding: utf-8 -*-
|
2 |
| -# Autogenerated by Sphinx on Wed Jun 5 16:43:53 2024 |
| 2 | +# Autogenerated by Sphinx on Thu Jun 27 15:02:53 2024 |
3 | 3 | # as part of the release process.
|
4 | 4 | topics = {'assert': 'The "assert" statement\n'
|
5 | 5 | '**********************\n'
|
|
362 | 362 | 'a single\n'
|
363 | 363 | 'target is allowed.\n'
|
364 | 364 | '\n'
|
365 |
| - 'For simple names as assignment targets, if in class or module ' |
366 |
| - 'scope,\n' |
367 |
| - 'the annotations are evaluated and stored in a special class or ' |
368 |
| - 'module\n' |
369 |
| - 'attribute "__annotations__" that is a dictionary mapping from ' |
370 |
| - 'variable\n' |
371 |
| - 'names (mangled if private) to evaluated annotations. This ' |
372 |
| - 'attribute is\n' |
373 |
| - 'writable and is automatically created at the start of class or ' |
374 |
| - 'module\n' |
375 |
| - 'body execution, if annotations are found statically.\n' |
376 |
| - '\n' |
377 |
| - 'For expressions as assignment targets, the annotations are ' |
| 365 | + 'The assignment target is considered “simple” if it consists of ' |
| 366 | + 'a\n' |
| 367 | + 'single name that is not enclosed in parentheses. For simple ' |
| 368 | + 'assignment\n' |
| 369 | + 'targets, if in class or module scope, the annotations are ' |
378 | 370 | 'evaluated\n'
|
379 |
| - 'if in class or module scope, but not stored.\n' |
| 371 | + 'and stored in a special class or module attribute ' |
| 372 | + '"__annotations__"\n' |
| 373 | + 'that is a dictionary mapping from variable names (mangled if ' |
| 374 | + 'private)\n' |
| 375 | + 'to evaluated annotations. This attribute is writable and is\n' |
| 376 | + 'automatically created at the start of class or module body ' |
| 377 | + 'execution,\n' |
| 378 | + 'if annotations are found statically.\n' |
| 379 | + '\n' |
| 380 | + 'If the assignment target is not simple (an attribute, ' |
| 381 | + 'subscript node,\n' |
| 382 | + 'or parenthesized name), the annotation is evaluated if in ' |
| 383 | + 'class or\n' |
| 384 | + 'module scope, but not stored.\n' |
380 | 385 | '\n'
|
381 | 386 | 'If a name is annotated in a function scope, then this name is '
|
382 | 387 | 'local\n'
|
|
2388 | 2393 | 'An\n'
|
2389 | 2394 | 'expression-less "except" clause, if present, must be last; it '
|
2390 | 2395 | 'matches\n'
|
2391 |
| - 'any exception. For an "except" clause with an expression, that\n' |
2392 |
| - 'expression is evaluated, and the clause matches the exception if ' |
2393 |
| - 'the\n' |
2394 |
| - 'resulting object is “compatible” with the exception. An object ' |
2395 |
| - 'is\n' |
2396 |
| - 'compatible with an exception if the object is the class or a ' |
2397 |
| - '*non-\n' |
2398 |
| - 'virtual base class* of the exception object, or a tuple ' |
2399 |
| - 'containing an\n' |
2400 |
| - 'item that is the class or a non-virtual base class of the ' |
2401 |
| - 'exception\n' |
2402 |
| - 'object.\n' |
| 2396 | + 'any exception.\n' |
| 2397 | + '\n' |
| 2398 | + 'For an "except" clause with an expression, the expression must\n' |
| 2399 | + 'evaluate to an exception type or a tuple of exception types. ' |
| 2400 | + 'The\n' |
| 2401 | + 'raised exception matches an "except" clause whose expression ' |
| 2402 | + 'evaluates\n' |
| 2403 | + 'to the class or a *non-virtual base class* of the exception ' |
| 2404 | + 'object, or\n' |
| 2405 | + 'to a tuple that contains such a class.\n' |
2403 | 2406 | '\n'
|
2404 | 2407 | 'If no "except" clause matches the exception, the search for an\n'
|
2405 | 2408 | 'exception handler continues in the surrounding code and on the\n'
|
|
2548 | 2551 | ' ...\n'
|
2549 | 2552 | " ExceptionGroup('', (BlockingIOError()))\n"
|
2550 | 2553 | '\n'
|
2551 |
| - 'An "except*" clause must have a matching type, and this type ' |
2552 |
| - 'cannot be\n' |
2553 |
| - 'a subclass of "BaseExceptionGroup". It is not possible to mix ' |
2554 |
| - '"except"\n' |
2555 |
| - 'and "except*" in the same "try". "break", "continue" and ' |
2556 |
| - '"return"\n' |
2557 |
| - 'cannot appear in an "except*" clause.\n' |
| 2554 | + 'An "except*" clause must have a matching expression; it cannot ' |
| 2555 | + 'be\n' |
| 2556 | + '"except*:". Furthermore, this expression cannot contain ' |
| 2557 | + 'exception\n' |
| 2558 | + 'group types, because that would have ambiguous semantics.\n' |
| 2559 | + '\n' |
| 2560 | + 'It is not possible to mix "except" and "except*" in the same ' |
| 2561 | + '"try".\n' |
| 2562 | + '"break", "continue" and "return" cannot appear in an "except*" ' |
| 2563 | + 'clause.\n' |
2558 | 2564 | '\n'
|
2559 | 2565 | '\n'
|
2560 | 2566 | '"else" clause\n'
|
|
4536 | 4542 | ' It is not guaranteed that "__del__()" methods are called '
|
4537 | 4543 | 'for\n'
|
4538 | 4544 | ' objects that still exist when the interpreter exits.\n'
|
| 4545 | + ' "weakref.finalize" provides a straightforward way to ' |
| 4546 | + 'register a\n' |
| 4547 | + ' cleanup function to be called when an object is garbage ' |
| 4548 | + 'collected.\n' |
4539 | 4549 | '\n'
|
4540 | 4550 | ' Note:\n'
|
4541 | 4551 | '\n'
|
|
9995 | 10005 | ' It is not guaranteed that "__del__()" methods are called '
|
9996 | 10006 | 'for\n'
|
9997 | 10007 | ' objects that still exist when the interpreter exits.\n'
|
| 10008 | + ' "weakref.finalize" provides a straightforward way to ' |
| 10009 | + 'register a\n' |
| 10010 | + ' cleanup function to be called when an object is garbage ' |
| 10011 | + 'collected.\n' |
9998 | 10012 | '\n'
|
9999 | 10013 | ' Note:\n'
|
10000 | 10014 | '\n'
|
@@ -13489,14 +13503,15 @@
|
13489 | 13503 | 'clauses in turn until one is found that matches the exception. An\n'
|
13490 | 13504 | 'expression-less "except" clause, if present, must be last; it '
|
13491 | 13505 | 'matches\n'
|
13492 |
| - 'any exception. For an "except" clause with an expression, that\n' |
13493 |
| - 'expression is evaluated, and the clause matches the exception if the\n' |
13494 |
| - 'resulting object is “compatible” with the exception. An object is\n' |
13495 |
| - 'compatible with an exception if the object is the class or a *non-\n' |
13496 |
| - 'virtual base class* of the exception object, or a tuple containing ' |
13497 |
| - 'an\n' |
13498 |
| - 'item that is the class or a non-virtual base class of the exception\n' |
13499 |
| - 'object.\n' |
| 13506 | + 'any exception.\n' |
| 13507 | + '\n' |
| 13508 | + 'For an "except" clause with an expression, the expression must\n' |
| 13509 | + 'evaluate to an exception type or a tuple of exception types. The\n' |
| 13510 | + 'raised exception matches an "except" clause whose expression ' |
| 13511 | + 'evaluates\n' |
| 13512 | + 'to the class or a *non-virtual base class* of the exception object, ' |
| 13513 | + 'or\n' |
| 13514 | + 'to a tuple that contains such a class.\n' |
13500 | 13515 | '\n'
|
13501 | 13516 | 'If no "except" clause matches the exception, the search for an\n'
|
13502 | 13517 | 'exception handler continues in the surrounding code and on the\n'
|
@@ -13625,12 +13640,13 @@
|
13625 | 13640 | ' ...\n'
|
13626 | 13641 | " ExceptionGroup('', (BlockingIOError()))\n"
|
13627 | 13642 | '\n'
|
13628 |
| - 'An "except*" clause must have a matching type, and this type cannot ' |
13629 |
| - 'be\n' |
13630 |
| - 'a subclass of "BaseExceptionGroup". It is not possible to mix ' |
13631 |
| - '"except"\n' |
13632 |
| - 'and "except*" in the same "try". "break", "continue" and "return"\n' |
13633 |
| - 'cannot appear in an "except*" clause.\n' |
| 13643 | + 'An "except*" clause must have a matching expression; it cannot be\n' |
| 13644 | + '"except*:". Furthermore, this expression cannot contain exception\n' |
| 13645 | + 'group types, because that would have ambiguous semantics.\n' |
| 13646 | + '\n' |
| 13647 | + 'It is not possible to mix "except" and "except*" in the same "try".\n' |
| 13648 | + '"break", "continue" and "return" cannot appear in an "except*" ' |
| 13649 | + 'clause.\n' |
13634 | 13650 | '\n'
|
13635 | 13651 | '\n'
|
13636 | 13652 | '"else" clause\n'
|
|
16085 | 16101 | '\n'
|
16086 | 16102 | 'Notes:\n'
|
16087 | 16103 | '\n'
|
16088 |
| - '1. *t* must have the same length as the slice it is replacing.\n' |
| 16104 | + '1. If *k* is not equal to "1", *t* must have the same length as ' |
| 16105 | + 'the\n' |
| 16106 | + ' slice it is replacing.\n' |
16089 | 16107 | '\n'
|
16090 | 16108 | '2. The optional argument *i* defaults to "-1", so that by '
|
16091 | 16109 | 'default the\n'
|
|
16549 | 16567 | '\n'
|
16550 | 16568 | 'Notes:\n'
|
16551 | 16569 | '\n'
|
16552 |
| - '1. *t* must have the same length as the slice it is ' |
16553 |
| - 'replacing.\n' |
| 16570 | + '1. If *k* is not equal to "1", *t* must have the same ' |
| 16571 | + 'length as the\n' |
| 16572 | + ' slice it is replacing.\n' |
16554 | 16573 | '\n'
|
16555 | 16574 | '2. The optional argument *i* defaults to "-1", so that '
|
16556 | 16575 | 'by default the\n'
|
|
0 commit comments