|
1 | 1 | # -*- coding: utf-8 -*-
|
2 |
| -# Autogenerated by Sphinx on Tue Dec 6 19:31:49 2022 |
| 2 | +# Autogenerated by Sphinx on Tue Jan 10 13:08:32 2023 |
3 | 3 | topics = {'assert': 'The "assert" statement\n'
|
4 | 4 | '**********************\n'
|
5 | 5 | '\n'
|
|
2382 | 2382 | 'finished,\n'
|
2383 | 2383 | 'but if the sequence is empty, they will not have been assigned '
|
2384 | 2384 | 'to at\n'
|
2385 |
| - 'all by the loop. Hint: the built-in function "range()" returns ' |
2386 |
| - 'an\n' |
2387 |
| - 'iterator of integers suitable to emulate the effect of Pascal’s ' |
2388 |
| - '"for i\n' |
2389 |
| - ':= a to b do"; e.g., "list(range(3))" returns the list "[0, 1, ' |
2390 |
| - '2]".\n' |
| 2385 | + 'all by the loop. Hint: the built-in type "range()" represents\n' |
| 2386 | + 'immutable arithmetic sequences of integers. For instance, ' |
| 2387 | + 'iterating\n' |
| 2388 | + '"range(3)" successively yields 0, 1, and then 2.\n' |
2391 | 2389 | '\n'
|
2392 | 2390 | 'Changed in version 3.11: Starred elements are now allowed in '
|
2393 | 2391 | 'the\n'
|
|
2726 | 2724 | 'the\n'
|
2727 | 2725 | ' target list, it will be treated the same as an error '
|
2728 | 2726 | 'occurring\n'
|
2729 |
| - ' within the suite would be. See step 6 below.\n' |
| 2727 | + ' within the suite would be. See step 7 below.\n' |
2730 | 2728 | '\n'
|
2731 | 2729 | '6. The suite is executed.\n'
|
2732 | 2730 | '\n'
|
|
5668 | 5666 | 'be\n'
|
5669 | 5667 | 'determined by scanning the entire text of the block for name '
|
5670 | 5668 | 'binding\n'
|
5671 |
| - 'operations.\n' |
| 5669 | + 'operations. See the FAQ entry on UnboundLocalError for ' |
| 5670 | + 'examples.\n' |
5672 | 5671 | '\n'
|
5673 | 5672 | 'If the "global" statement occurs within a block, all uses of '
|
5674 | 5673 | 'the names\n'
|
|
5970 | 5969 | '\n'
|
5971 | 5970 | 'Names in the target list are not deleted when the loop is finished,\n'
|
5972 | 5971 | 'but if the sequence is empty, they will not have been assigned to at\n'
|
5973 |
| - 'all by the loop. Hint: the built-in function "range()" returns an\n' |
5974 |
| - 'iterator of integers suitable to emulate the effect of Pascal’s "for ' |
5975 |
| - 'i\n' |
5976 |
| - ':= a to b do"; e.g., "list(range(3))" returns the list "[0, 1, 2]".\n' |
| 5972 | + 'all by the loop. Hint: the built-in type "range()" represents\n' |
| 5973 | + 'immutable arithmetic sequences of integers. For instance, iterating\n' |
| 5974 | + '"range(3)" successively yields 0, 1, and then 2.\n' |
5977 | 5975 | '\n'
|
5978 | 5976 | 'Changed in version 3.11: Starred elements are now allowed in the\n'
|
5979 | 5977 | 'expression list.\n',
|
|
7781 | 7779 | 'within a code block. The local variables of a code block can be\n'
|
7782 | 7780 | 'determined by scanning the entire text of the block for name '
|
7783 | 7781 | 'binding\n'
|
7784 |
| - 'operations.\n' |
| 7782 | + 'operations. See the FAQ entry on UnboundLocalError for examples.\n' |
7785 | 7783 | '\n'
|
7786 | 7784 | 'If the "global" statement occurs within a block, all uses of the '
|
7787 | 7785 | 'names\n'
|
@@ -11322,35 +11320,35 @@
|
11322 | 11320 | '\n'
|
11323 | 11321 | "str.encode(encoding='utf-8', errors='strict')\n"
|
11324 | 11322 | '\n'
|
11325 |
| - ' Return an encoded version of the string as a bytes ' |
11326 |
| - 'object. Default\n' |
11327 |
| - ' encoding is "\'utf-8\'". *errors* may be given to set a ' |
11328 |
| - 'different\n' |
11329 |
| - ' error handling scheme. The default for *errors* is ' |
11330 |
| - '"\'strict\'",\n' |
11331 |
| - ' meaning that encoding errors raise a "UnicodeError". ' |
| 11323 | + ' Return the string encoded to "bytes".\n' |
| 11324 | + '\n' |
| 11325 | + ' *encoding* defaults to "\'utf-8\'"; see Standard ' |
| 11326 | + 'Encodings for\n' |
| 11327 | + ' possible values.\n' |
| 11328 | + '\n' |
| 11329 | + ' *errors* controls how encoding errors are handled. If ' |
| 11330 | + '"\'strict\'"\n' |
| 11331 | + ' (the default), a "UnicodeError" exception is raised. ' |
11332 | 11332 | 'Other possible\n'
|
11333 | 11333 | ' values are "\'ignore\'", "\'replace\'", '
|
11334 | 11334 | '"\'xmlcharrefreplace\'",\n'
|
11335 | 11335 | ' "\'backslashreplace\'" and any other name registered '
|
11336 | 11336 | 'via\n'
|
11337 |
| - ' "codecs.register_error()", see section Error Handlers. ' |
11338 |
| - 'For a list\n' |
11339 |
| - ' of possible encodings, see section Standard Encodings.\n' |
| 11337 | + ' "codecs.register_error()". See Error Handlers for ' |
| 11338 | + 'details.\n' |
11340 | 11339 | '\n'
|
11341 |
| - ' By default, the *errors* argument is not checked for ' |
11342 |
| - 'best\n' |
11343 |
| - ' performances, but only used at the first encoding ' |
11344 |
| - 'error. Enable the\n' |
11345 |
| - ' Python Development Mode, or use a debug build to check ' |
11346 |
| - '*errors*.\n' |
| 11340 | + ' For performance reasons, the value of *errors* is not ' |
| 11341 | + 'checked for\n' |
| 11342 | + ' validity unless an encoding error actually occurs, ' |
| 11343 | + 'Python\n' |
| 11344 | + ' Development Mode is enabled or a debug build is used.\n' |
11347 | 11345 | '\n'
|
11348 |
| - ' Changed in version 3.1: Support for keyword arguments ' |
11349 |
| - 'added.\n' |
| 11346 | + ' Changed in version 3.1: Added support for keyword ' |
| 11347 | + 'arguments.\n' |
11350 | 11348 | '\n'
|
11351 |
| - ' Changed in version 3.9: The *errors* is now checked in ' |
11352 |
| - 'development\n' |
11353 |
| - ' mode and in debug mode.\n' |
| 11349 | + ' Changed in version 3.9: The value of the *errors* ' |
| 11350 | + 'argument is now\n' |
| 11351 | + ' checked in Python Development Mode and in debug mode.\n' |
11354 | 11352 | '\n'
|
11355 | 11353 | 'str.endswith(suffix[, start[, end]])\n'
|
11356 | 11354 | '\n'
|
|
14099 | 14097 | ' >>> class Counter(dict):\n'
|
14100 | 14098 | ' ... def __missing__(self, key):\n'
|
14101 | 14099 | ' ... return 0\n'
|
| 14100 | + ' ...\n' |
14102 | 14101 | ' >>> c = Counter()\n'
|
14103 | 14102 | " >>> c['red']\n"
|
14104 | 14103 | ' 0\n'
|
|
14425 | 14424 | ' >>> n = 0\n'
|
14426 | 14425 | ' >>> for val in values:\n'
|
14427 | 14426 | ' ... n += val\n'
|
| 14427 | + ' ...\n' |
14428 | 14428 | ' >>> print(n)\n'
|
14429 | 14429 | ' 504\n'
|
14430 | 14430 | '\n'
|
|
14452 | 14452 | ' >>> # get back a read-only proxy for the original '
|
14453 | 14453 | 'dictionary\n'
|
14454 | 14454 | ' >>> values.mapping\n'
|
14455 |
| - " mappingproxy({'eggs': 2, 'sausage': 1, 'bacon': 1, " |
14456 |
| - "'spam': 500})\n" |
| 14455 | + " mappingproxy({'bacon': 1, 'spam': 500})\n" |
14457 | 14456 | " >>> values.mapping['spam']\n"
|
14458 | 14457 | ' 500\n',
|
14459 | 14458 | 'typesmethods': 'Methods\n'
|
|
15499 | 15498 | ' returns without an error, then "__exit__()" will always be\n'
|
15500 | 15499 | ' called. Thus, if an error occurs during the assignment to the\n'
|
15501 | 15500 | ' target list, it will be treated the same as an error occurring\n'
|
15502 |
| - ' within the suite would be. See step 6 below.\n' |
| 15501 | + ' within the suite would be. See step 7 below.\n' |
15503 | 15502 | '\n'
|
15504 | 15503 | '6. The suite is executed.\n'
|
15505 | 15504 | '\n'
|
|
0 commit comments