|
1 | 1 | # -*- coding: utf-8 -*- |
2 | | -# Autogenerated by Sphinx on Mon Jul 29 15:22:27 2019 |
| 2 | +# Autogenerated by Sphinx on Thu Aug 29 23:57:58 2019 |
3 | 3 | topics = {'assert': 'The "assert" statement\n' |
4 | 4 | '**********************\n' |
5 | 5 | '\n' |
|
808 | 808 | 'whose name is\n' |
809 | 809 | 'the key of the property in the owner class’ "__dict__".\n' |
810 | 810 | '\n' |
811 | | - 'object.__get__(self, instance, owner)\n' |
| 811 | + 'object.__get__(self, instance, owner=None)\n' |
812 | 812 | '\n' |
813 | 813 | ' Called to get the attribute of the owner class (class ' |
814 | 814 | 'attribute\n' |
815 | 815 | ' access) or of an instance of that class (instance ' |
816 | 816 | 'attribute\n' |
817 | | - ' access). *owner* is always the owner class, while ' |
818 | | - '*instance* is the\n' |
819 | | - ' instance that the attribute was accessed through, or ' |
820 | | - '"None" when\n' |
821 | | - ' the attribute is accessed through the *owner*. This ' |
822 | | - 'method should\n' |
823 | | - ' return the (computed) attribute value or raise an ' |
824 | | - '"AttributeError"\n' |
825 | | - ' exception.\n' |
| 817 | + ' access). The optional *owner* argument is the owner ' |
| 818 | + 'class, while\n' |
| 819 | + ' *instance* is the instance that the attribute was ' |
| 820 | + 'accessed through,\n' |
| 821 | + ' or "None" when the attribute is accessed through the ' |
| 822 | + '*owner*.\n' |
| 823 | + '\n' |
| 824 | + ' This method should return the computed attribute ' |
| 825 | + 'value or raise an\n' |
| 826 | + ' "AttributeError" exception.\n' |
| 827 | + '\n' |
| 828 | + ' **PEP 252** specifies that "__get__()" is callable ' |
| 829 | + 'with one or two\n' |
| 830 | + ' arguments. Python’s own built-in descriptors support ' |
| 831 | + 'this\n' |
| 832 | + ' specification; however, it is likely that some ' |
| 833 | + 'third-party tools\n' |
| 834 | + ' have descriptors that require both arguments. ' |
| 835 | + 'Python’s own\n' |
| 836 | + ' "__getattribute__()" implementation always passes in ' |
| 837 | + 'both arguments\n' |
| 838 | + ' whether they are required or not.\n' |
826 | 839 | '\n' |
827 | 840 | 'object.__set__(self, instance, value)\n' |
828 | 841 | '\n' |
829 | 842 | ' Called to set the attribute on an instance *instance* ' |
830 | 843 | 'of the owner\n' |
831 | 844 | ' class to a new value, *value*.\n' |
832 | 845 | '\n' |
| 846 | + ' Note, adding "__set__()" or "__delete__()" changes ' |
| 847 | + 'the kind of\n' |
| 848 | + ' descriptor to a “data descriptor”. See Invoking ' |
| 849 | + 'Descriptors for\n' |
| 850 | + ' more details.\n' |
| 851 | + '\n' |
833 | 852 | 'object.__delete__(self, instance)\n' |
834 | 853 | '\n' |
835 | 854 | ' Called to delete the attribute on an instance ' |
|
1829 | 1848 | 'all false.\n' |
1830 | 1849 | ' This behavior is compliant with IEEE 754.\n' |
1831 | 1850 | '\n' |
| 1851 | + '* "None" and "NotImplemented" are singletons. **PEP 8** ' |
| 1852 | + 'advises\n' |
| 1853 | + ' that comparisons for singletons should always be done with ' |
| 1854 | + '"is" or\n' |
| 1855 | + ' "is not", never the equality operators.\n' |
| 1856 | + '\n' |
1832 | 1857 | '* Binary sequences (instances of "bytes" or "bytearray") can ' |
1833 | 1858 | 'be\n' |
1834 | 1859 | ' compared within and across their types. They compare\n' |
|
1854 | 1879 | ' these types raises "TypeError".\n' |
1855 | 1880 | '\n' |
1856 | 1881 | ' Sequences compare lexicographically using comparison of\n' |
1857 | | - ' corresponding elements, whereby reflexivity of the elements ' |
1858 | | - 'is\n' |
1859 | | - ' enforced.\n' |
1860 | | - '\n' |
1861 | | - ' In enforcing reflexivity of elements, the comparison of ' |
1862 | | - 'collections\n' |
1863 | | - ' assumes that for a collection element "x", "x == x" is ' |
1864 | | - 'always true.\n' |
1865 | | - ' Based on that assumption, element identity is compared ' |
1866 | | - 'first, and\n' |
1867 | | - ' element comparison is performed only for distinct ' |
1868 | | - 'elements. This\n' |
1869 | | - ' approach yields the same result as a strict element ' |
1870 | | - 'comparison\n' |
1871 | | - ' would, if the compared elements are reflexive. For ' |
1872 | | - 'non-reflexive\n' |
1873 | | - ' elements, the result is different than for strict element\n' |
1874 | | - ' comparison, and may be surprising: The non-reflexive ' |
1875 | | - 'not-a-number\n' |
1876 | | - ' values for example result in the following comparison ' |
1877 | | - 'behavior when\n' |
1878 | | - ' used in a list:\n' |
1879 | | - '\n' |
1880 | | - " >>> nan = float('NaN')\n" |
1881 | | - ' >>> nan is nan\n' |
1882 | | - ' True\n' |
1883 | | - ' >>> nan == nan\n' |
1884 | | - ' False <-- the defined non-reflexive ' |
1885 | | - 'behavior of NaN\n' |
1886 | | - ' >>> [nan] == [nan]\n' |
1887 | | - ' True <-- list enforces reflexivity and ' |
1888 | | - 'tests identity first\n' |
| 1882 | + ' corresponding elements. The built-in containers typically ' |
| 1883 | + 'assume\n' |
| 1884 | + ' identical objects are equal to themselves. That lets them ' |
| 1885 | + 'bypass\n' |
| 1886 | + ' equality tests for identical objects to improve performance ' |
| 1887 | + 'and to\n' |
| 1888 | + ' maintain their internal invariants.\n' |
1889 | 1889 | '\n' |
1890 | 1890 | ' Lexicographical comparison between built-in collections ' |
1891 | 1891 | 'works as\n' |
|
3126 | 3126 | 'returning\n' |
3127 | 3127 | ' it.\n' |
3128 | 3128 | '\n' |
3129 | | - ' If "__new__()" returns an instance of *cls*, then the ' |
3130 | | - 'new\n' |
3131 | | - ' instance’s "__init__()" method will be invoked like\n' |
3132 | | - ' "__init__(self[, ...])", where *self* is the new ' |
3133 | | - 'instance and the\n' |
3134 | | - ' remaining arguments are the same as were passed to ' |
3135 | | - '"__new__()".\n' |
| 3129 | + ' If "__new__()" is invoked during object construction and ' |
| 3130 | + 'it returns\n' |
| 3131 | + ' an instance or subclass of *cls*, then the new ' |
| 3132 | + 'instance’s\n' |
| 3133 | + ' "__init__()" method will be invoked like ' |
| 3134 | + '"__init__(self[, ...])",\n' |
| 3135 | + ' where *self* is the new instance and the remaining ' |
| 3136 | + 'arguments are\n' |
| 3137 | + ' the same as were passed to the object constructor.\n' |
3136 | 3138 | '\n' |
3137 | 3139 | ' If "__new__()" does not return an instance of *cls*, ' |
3138 | 3140 | 'then the new\n' |
|
3500 | 3502 | ' hashable by an "isinstance(obj, ' |
3501 | 3503 | 'collections.abc.Hashable)" call.\n' |
3502 | 3504 | '\n' |
3503 | | - ' Note: By default, the "__hash__()" values of str, bytes ' |
3504 | | - 'and\n' |
3505 | | - ' datetime objects are “salted” with an unpredictable ' |
3506 | | - 'random value.\n' |
| 3505 | + ' Note: By default, the "__hash__()" values of str and ' |
| 3506 | + 'bytes\n' |
| 3507 | + ' objects are “salted” with an unpredictable random ' |
| 3508 | + 'value.\n' |
3507 | 3509 | ' Although they remain constant within an individual ' |
3508 | 3510 | 'Python\n' |
3509 | 3511 | ' process, they are not predictable between repeated ' |
|
7841 | 7843 | 'returning\n' |
7842 | 7844 | ' it.\n' |
7843 | 7845 | '\n' |
7844 | | - ' If "__new__()" returns an instance of *cls*, then the ' |
7845 | | - 'new\n' |
7846 | | - ' instance’s "__init__()" method will be invoked like\n' |
7847 | | - ' "__init__(self[, ...])", where *self* is the new instance ' |
7848 | | - 'and the\n' |
7849 | | - ' remaining arguments are the same as were passed to ' |
7850 | | - '"__new__()".\n' |
| 7846 | + ' If "__new__()" is invoked during object construction and ' |
| 7847 | + 'it returns\n' |
| 7848 | + ' an instance or subclass of *cls*, then the new ' |
| 7849 | + 'instance’s\n' |
| 7850 | + ' "__init__()" method will be invoked like "__init__(self[, ' |
| 7851 | + '...])",\n' |
| 7852 | + ' where *self* is the new instance and the remaining ' |
| 7853 | + 'arguments are\n' |
| 7854 | + ' the same as were passed to the object constructor.\n' |
7851 | 7855 | '\n' |
7852 | 7856 | ' If "__new__()" does not return an instance of *cls*, then ' |
7853 | 7857 | 'the new\n' |
|
8212 | 8216 | ' hashable by an "isinstance(obj, ' |
8213 | 8217 | 'collections.abc.Hashable)" call.\n' |
8214 | 8218 | '\n' |
8215 | | - ' Note: By default, the "__hash__()" values of str, bytes ' |
8216 | | - 'and\n' |
8217 | | - ' datetime objects are “salted” with an unpredictable ' |
8218 | | - 'random value.\n' |
| 8219 | + ' Note: By default, the "__hash__()" values of str and ' |
| 8220 | + 'bytes\n' |
| 8221 | + ' objects are “salted” with an unpredictable random ' |
| 8222 | + 'value.\n' |
8219 | 8223 | ' Although they remain constant within an individual ' |
8220 | 8224 | 'Python\n' |
8221 | 8225 | ' process, they are not predictable between repeated ' |
|
8440 | 8444 | 'whose name is\n' |
8441 | 8445 | 'the key of the property in the owner class’ "__dict__".\n' |
8442 | 8446 | '\n' |
8443 | | - 'object.__get__(self, instance, owner)\n' |
| 8447 | + 'object.__get__(self, instance, owner=None)\n' |
8444 | 8448 | '\n' |
8445 | 8449 | ' Called to get the attribute of the owner class (class ' |
8446 | 8450 | 'attribute\n' |
8447 | 8451 | ' access) or of an instance of that class (instance ' |
8448 | 8452 | 'attribute\n' |
8449 | | - ' access). *owner* is always the owner class, while ' |
8450 | | - '*instance* is the\n' |
8451 | | - ' instance that the attribute was accessed through, or ' |
8452 | | - '"None" when\n' |
8453 | | - ' the attribute is accessed through the *owner*. This ' |
8454 | | - 'method should\n' |
8455 | | - ' return the (computed) attribute value or raise an ' |
8456 | | - '"AttributeError"\n' |
8457 | | - ' exception.\n' |
| 8453 | + ' access). The optional *owner* argument is the owner ' |
| 8454 | + 'class, while\n' |
| 8455 | + ' *instance* is the instance that the attribute was ' |
| 8456 | + 'accessed through,\n' |
| 8457 | + ' or "None" when the attribute is accessed through the ' |
| 8458 | + '*owner*.\n' |
| 8459 | + '\n' |
| 8460 | + ' This method should return the computed attribute value or ' |
| 8461 | + 'raise an\n' |
| 8462 | + ' "AttributeError" exception.\n' |
| 8463 | + '\n' |
| 8464 | + ' **PEP 252** specifies that "__get__()" is callable with ' |
| 8465 | + 'one or two\n' |
| 8466 | + ' arguments. Python’s own built-in descriptors support ' |
| 8467 | + 'this\n' |
| 8468 | + ' specification; however, it is likely that some ' |
| 8469 | + 'third-party tools\n' |
| 8470 | + ' have descriptors that require both arguments. Python’s ' |
| 8471 | + 'own\n' |
| 8472 | + ' "__getattribute__()" implementation always passes in both ' |
| 8473 | + 'arguments\n' |
| 8474 | + ' whether they are required or not.\n' |
8458 | 8475 | '\n' |
8459 | 8476 | 'object.__set__(self, instance, value)\n' |
8460 | 8477 | '\n' |
8461 | 8478 | ' Called to set the attribute on an instance *instance* of ' |
8462 | 8479 | 'the owner\n' |
8463 | 8480 | ' class to a new value, *value*.\n' |
8464 | 8481 | '\n' |
| 8482 | + ' Note, adding "__set__()" or "__delete__()" changes the ' |
| 8483 | + 'kind of\n' |
| 8484 | + ' descriptor to a “data descriptor”. See Invoking ' |
| 8485 | + 'Descriptors for\n' |
| 8486 | + ' more details.\n' |
| 8487 | + '\n' |
8465 | 8488 | 'object.__delete__(self, instance)\n' |
8466 | 8489 | '\n' |
8467 | 8490 | ' Called to delete the attribute on an instance *instance* ' |
@@ -10030,13 +10053,15 @@ |
10030 | 10053 | '\n' |
10031 | 10054 | ' Return true if there are only whitespace characters in ' |
10032 | 10055 | 'the string\n' |
10033 | | - ' and there is at least one character, false otherwise. ' |
10034 | | - 'Whitespace\n' |
10035 | | - ' characters are those characters defined in the Unicode ' |
10036 | | - 'character\n' |
10037 | | - ' database as “Other” or “Separator” and those with ' |
10038 | | - 'bidirectional\n' |
10039 | | - ' property being one of “WS”, “B”, or “S”.\n' |
| 10056 | + ' and there is at least one character, false otherwise.\n' |
| 10057 | + '\n' |
| 10058 | + ' A character is *whitespace* if in the Unicode character ' |
| 10059 | + 'database\n' |
| 10060 | + ' (see "unicodedata"), either its general category is ' |
| 10061 | + '"Zs"\n' |
| 10062 | + ' (“Separator, space”), or its bidirectional class is one ' |
| 10063 | + 'of "WS",\n' |
| 10064 | + ' "B", or "S".\n' |
10040 | 10065 | '\n' |
10041 | 10066 | 'str.istitle()\n' |
10042 | 10067 | '\n' |
|
10725 | 10750 | '\n' |
10726 | 10751 | ' Changed in version 3.6: Unrecognized escape sequences produce ' |
10727 | 10752 | 'a\n' |
10728 | | - ' "DeprecationWarning".\n' |
10729 | | - '\n' |
10730 | | - ' Changed in version 3.8: Unrecognized escape sequences produce ' |
| 10753 | + ' "DeprecationWarning". In a future Python version they will be ' |
10731 | 10754 | 'a\n' |
10732 | | - ' "SyntaxWarning". In some future version of Python they will ' |
10733 | | - 'be a\n' |
10734 | | - ' "SyntaxError".\n' |
| 10755 | + ' "SyntaxWarning" and eventually a "SyntaxError".\n' |
10735 | 10756 | '\n' |
10736 | 10757 | 'Even in a raw literal, quotes can be escaped with a backslash, ' |
10737 | 10758 | 'but the\n' |
|
0 commit comments