|
1 | 1 | # -*- coding: utf-8 -*- |
2 | | -# Autogenerated by Sphinx on Mon Mar 23 17:18:04 2020 |
| 2 | +# Autogenerated by Sphinx on Mon Apr 27 22:35:16 2020 |
3 | 3 | topics = {'assert': 'The "assert" statement\n' |
4 | 4 | '**********************\n' |
5 | 5 | '\n' |
|
1877 | 1877 | ' value is false. A counter-intuitive implication is that ' |
1878 | 1878 | 'not-a-number\n' |
1879 | 1879 | ' values are not equal to themselves. For example, if "x =\n' |
1880 | | - ' float(\'NaN\')", "3 < x", "x < 3", "x == x", "x != x" are ' |
1881 | | - 'all false.\n' |
1882 | | - ' This behavior is compliant with IEEE 754.\n' |
| 1880 | + ' float(\'NaN\')", "3 < x", "x < 3" and "x == x" are all ' |
| 1881 | + 'false, while "x\n' |
| 1882 | + ' != x" is true. This behavior is compliant with IEEE 754.\n' |
1883 | 1883 | '\n' |
1884 | 1884 | '* "None" and "NotImplemented" are singletons. **PEP 8** ' |
1885 | 1885 | 'advises\n' |
|
3150 | 3150 | '\n' |
3151 | 3151 | 'When a description of an arithmetic operator below uses the ' |
3152 | 3152 | 'phrase\n' |
3153 | | - '“the numeric arguments are converted to a common type,” this ' |
| 3153 | + '“the numeric arguments are converted to a common type”, this ' |
3154 | 3154 | 'means\n' |
3155 | 3155 | 'that the operator implementation for built-in types works as ' |
3156 | 3156 | 'follows:\n' |
|
3414 | 3414 | '\n' |
3415 | 3415 | ' Changed in version 3.7: "object.__format__(x, \'\')" is ' |
3416 | 3416 | 'now\n' |
3417 | | - ' equivalent to "str(x)" rather than "format(str(self), ' |
| 3417 | + ' equivalent to "str(x)" rather than "format(str(x), ' |
3418 | 3418 | '\'\')".\n' |
3419 | 3419 | '\n' |
3420 | 3420 | 'object.__lt__(self, other)\n' |
|
5962 | 5962 | 'convention.\n' |
5963 | 5963 | '\n' |
5964 | 5964 | '"__*__"\n' |
5965 | | - ' System-defined names. These names are defined by the ' |
5966 | | - 'interpreter\n' |
5967 | | - ' and its implementation (including the standard library). ' |
5968 | | - 'Current\n' |
5969 | | - ' system names are discussed in the Special method names ' |
5970 | | - 'section and\n' |
5971 | | - ' elsewhere. More will likely be defined in future versions ' |
5972 | | - 'of\n' |
5973 | | - ' Python. *Any* use of "__*__" names, in any context, that ' |
5974 | | - 'does not\n' |
5975 | | - ' follow explicitly documented use, is subject to breakage ' |
5976 | | - 'without\n' |
5977 | | - ' warning.\n' |
| 5965 | + ' System-defined names, informally known as “dunder” names. ' |
| 5966 | + 'These\n' |
| 5967 | + ' names are defined by the interpreter and its ' |
| 5968 | + 'implementation\n' |
| 5969 | + ' (including the standard library). Current system names are\n' |
| 5970 | + ' discussed in the Special method names section and ' |
| 5971 | + 'elsewhere. More\n' |
| 5972 | + ' will likely be defined in future versions of Python. *Any* ' |
| 5973 | + 'use of\n' |
| 5974 | + ' "__*__" names, in any context, that does not follow ' |
| 5975 | + 'explicitly\n' |
| 5976 | + ' documented use, is subject to breakage without warning.\n' |
5978 | 5977 | '\n' |
5979 | 5978 | '"__*"\n' |
5980 | 5979 | ' Class-private names. Names in this category, when used ' |
|
6110 | 6109 | 'convention.\n' |
6111 | 6110 | '\n' |
6112 | 6111 | '"__*__"\n' |
6113 | | - ' System-defined names. These names are defined by the ' |
6114 | | - 'interpreter\n' |
6115 | | - ' and its implementation (including the standard library). ' |
6116 | | - 'Current\n' |
6117 | | - ' system names are discussed in the Special method names ' |
6118 | | - 'section and\n' |
6119 | | - ' elsewhere. More will likely be defined in future versions ' |
6120 | | - 'of\n' |
6121 | | - ' Python. *Any* use of "__*__" names, in any context, that ' |
6122 | | - 'does not\n' |
6123 | | - ' follow explicitly documented use, is subject to breakage ' |
6124 | | - 'without\n' |
6125 | | - ' warning.\n' |
| 6112 | + ' System-defined names, informally known as “dunder” names. ' |
| 6113 | + 'These\n' |
| 6114 | + ' names are defined by the interpreter and its ' |
| 6115 | + 'implementation\n' |
| 6116 | + ' (including the standard library). Current system names ' |
| 6117 | + 'are\n' |
| 6118 | + ' discussed in the Special method names section and ' |
| 6119 | + 'elsewhere. More\n' |
| 6120 | + ' will likely be defined in future versions of Python. ' |
| 6121 | + '*Any* use of\n' |
| 6122 | + ' "__*__" names, in any context, that does not follow ' |
| 6123 | + 'explicitly\n' |
| 6124 | + ' documented use, is subject to breakage without warning.\n' |
6126 | 6125 | '\n' |
6127 | 6126 | '"__*"\n' |
6128 | 6127 | ' Class-private names. Names in this category, when used ' |
|
7007 | 7006 | 'program is represented by objects or by relations between ' |
7008 | 7007 | 'objects. (In\n' |
7009 | 7008 | 'a sense, and in conformance to Von Neumann’s model of a “stored\n' |
7010 | | - 'program computer,” code is also represented by objects.)\n' |
| 7009 | + 'program computer”, code is also represented by objects.)\n' |
7011 | 7010 | '\n' |
7012 | 7011 | 'Every object has an identity, a type and a value. An object’s\n' |
7013 | 7012 | '*identity* never changes once it has been created; you may think ' |
|
8168 | 8167 | '\n' |
8169 | 8168 | ' Changed in version 3.7: "object.__format__(x, \'\')" is ' |
8170 | 8169 | 'now\n' |
8171 | | - ' equivalent to "str(x)" rather than "format(str(self), ' |
| 8170 | + ' equivalent to "str(x)" rather than "format(str(x), ' |
8172 | 8171 | '\'\')".\n' |
8173 | 8172 | '\n' |
8174 | 8173 | 'object.__lt__(self, other)\n' |
|
9915 | 9914 | '*start* and\n' |
9916 | 9915 | ' *end* are interpreted as in slice notation.\n' |
9917 | 9916 | '\n' |
| 9917 | + 'str.removeprefix(prefix, /)\n' |
| 9918 | + '\n' |
| 9919 | + ' If the string starts with the *prefix* string, return\n' |
| 9920 | + ' "string[len(prefix):]". Otherwise, return a copy of the ' |
| 9921 | + 'original\n' |
| 9922 | + ' string:\n' |
| 9923 | + '\n' |
| 9924 | + " >>> 'TestHook'.removeprefix('Test')\n" |
| 9925 | + " 'Hook'\n" |
| 9926 | + " >>> 'BaseTestCase'.removeprefix('Test')\n" |
| 9927 | + " 'BaseTestCase'\n" |
| 9928 | + '\n' |
| 9929 | + ' New in version 3.9.\n' |
| 9930 | + '\n' |
| 9931 | + 'str.removesuffix(suffix, /)\n' |
| 9932 | + '\n' |
| 9933 | + ' If the string ends with the *suffix* string and that ' |
| 9934 | + '*suffix* is\n' |
| 9935 | + ' not empty, return "string[:-len(suffix)]". Otherwise, ' |
| 9936 | + 'return a copy\n' |
| 9937 | + ' of the original string:\n' |
| 9938 | + '\n' |
| 9939 | + " >>> 'MiscTests'.removesuffix('Tests')\n" |
| 9940 | + " 'Misc'\n" |
| 9941 | + " >>> 'TmpDirMixin'.removesuffix('Tests')\n" |
| 9942 | + " 'TmpDirMixin'\n" |
| 9943 | + '\n' |
| 9944 | + ' New in version 3.9.\n' |
| 9945 | + '\n' |
9918 | 9946 | 'str.encode(encoding="utf-8", errors="strict")\n' |
9919 | 9947 | '\n' |
9920 | 9948 | ' Return an encoded version of the string as a bytes ' |
|
10297 | 10325 | " >>> 'www.example.com'.lstrip('cmowz.')\n" |
10298 | 10326 | " 'example.com'\n" |
10299 | 10327 | '\n' |
| 10328 | + ' See "str.removeprefix()" for a method that will remove ' |
| 10329 | + 'a single\n' |
| 10330 | + ' prefix string rather than all of a set of characters. ' |
| 10331 | + 'For example:\n' |
| 10332 | + '\n' |
| 10333 | + " >>> 'Arthur: three!'.lstrip('Arthur: ')\n" |
| 10334 | + " 'ee!'\n" |
| 10335 | + " >>> 'Arthur: three!'.removeprefix('Arthur: ')\n" |
| 10336 | + " 'three!'\n" |
| 10337 | + '\n' |
10300 | 10338 | 'static str.maketrans(x[, y[, z]])\n' |
10301 | 10339 | '\n' |
10302 | 10340 | ' This static method returns a translation table usable ' |
|
10410 | 10448 | " >>> 'mississippi'.rstrip('ipz')\n" |
10411 | 10449 | " 'mississ'\n" |
10412 | 10450 | '\n' |
| 10451 | + ' See "str.removesuffix()" for a method that will remove ' |
| 10452 | + 'a single\n' |
| 10453 | + ' suffix string rather than all of a set of characters. ' |
| 10454 | + 'For example:\n' |
| 10455 | + '\n' |
| 10456 | + " >>> 'Monty Python'.rstrip(' Python')\n" |
| 10457 | + " 'M'\n" |
| 10458 | + " >>> 'Monty Python'.removesuffix(' Python')\n" |
| 10459 | + " 'Monty'\n" |
| 10460 | + '\n' |
10413 | 10461 | 'str.split(sep=None, maxsplit=-1)\n' |
10414 | 10462 | '\n' |
10415 | 10463 | ' Return a list of the words in the string, using *sep* ' |
|
11483 | 11531 | ' then they can be used interchangeably to index the same\n' |
11484 | 11532 | ' dictionary entry.\n' |
11485 | 11533 | '\n' |
| 11534 | + ' Dictionaries preserve insertion order, meaning that keys will ' |
| 11535 | + 'be\n' |
| 11536 | + ' produced in the same order they were added sequentially over ' |
| 11537 | + 'the\n' |
| 11538 | + ' dictionary. Replacing an existing key does not change the ' |
| 11539 | + 'order,\n' |
| 11540 | + ' however removing a key and re-inserting it will add it to ' |
| 11541 | + 'the\n' |
| 11542 | + ' end instead of keeping its old place.\n' |
| 11543 | + '\n' |
11486 | 11544 | ' Dictionaries are mutable; they can be created by the "{...}"\n' |
11487 | 11545 | ' notation (see section Dictionary displays).\n' |
11488 | 11546 | '\n' |
|
11491 | 11549 | '"collections"\n' |
11492 | 11550 | ' module.\n' |
11493 | 11551 | '\n' |
| 11552 | + ' Changed in version 3.7: Dictionaries did not preserve ' |
| 11553 | + 'insertion\n' |
| 11554 | + ' order in versions of Python before 3.6. In CPython 3.6,\n' |
| 11555 | + ' insertion order was preserved, but it was considered an\n' |
| 11556 | + ' implementation detail at that time rather than a language\n' |
| 11557 | + ' guarantee.\n' |
| 11558 | + '\n' |
11494 | 11559 | 'Callable types\n' |
11495 | 11560 | ' These are the types to which the function call operation (see\n' |
11496 | 11561 | ' section Calls) can be applied:\n' |
|
0 commit comments