diff options
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/compound_stmts.rst | 2 | ||||
-rw-r--r-- | Doc/reference/datamodel.rst | 5 | ||||
-rw-r--r-- | Doc/reference/expressions.rst | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index a661503..08d2f5d 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -553,7 +553,7 @@ must be given a value in the :meth:`__init__` method or in another method. Both class and instance variables are accessible through the notation "``self.name``", and an instance variable hides a class variable with the same name when accessed in this way. Class variables with immutable values can be -used as defaults for instance variables. Descriptors can be used to create +used as defaults for instance variables. Descriptors can be used to create instance variables with different implementation details. .. XXX add link to descriptor docs above diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 2e245f2..3ebc973 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -852,7 +852,7 @@ Internal types single: bytecode object: code - Code objects represent *byte-compiled* executable Python code, or *bytecode*. + Code objects represent *byte-compiled* executable Python code, or :term:`bytecode`. The difference between a code object and a function object is that the function object contains an explicit reference to the function's globals (the module in which it was defined), while a code object contains no context; also the default @@ -873,7 +873,7 @@ Internal types used by the bytecode; :attr:`co_names` is a tuple containing the names used by the bytecode; :attr:`co_filename` is the filename from which the code was compiled; :attr:`co_firstlineno` is the first line number of the function; - :attr:`co_lnotab` is a string encoding the mapping from byte code offsets to + :attr:`co_lnotab` is a string encoding the mapping from bytecode offsets to line numbers (for details see the source code of the interpreter); :attr:`co_stacksize` is the required stack size (including local variables); :attr:`co_flags` is an integer encoding a number of flags for the interpreter. @@ -1039,6 +1039,7 @@ Internal types .. % ========================================================================= +.. _newstyle: .. _specialnames: diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 4d2ec9a..1617052 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -1273,7 +1273,9 @@ groups from right to left). .. [#] While comparisons between strings make sense at the byte level, they may be counter-intuitive to users. For example, the strings ``"\u00C7"`` and ``"\u0327\u0043"`` compare differently, even though they both represent the - same unicode character (LATIN CAPTITAL LETTER C WITH CEDILLA). + same unicode character (LATIN CAPTITAL LETTER C WITH CEDILLA). To compare + strings in a human recognizable way, compare using + :func:`unicodedata.normalize`. .. [#] The implementation computes this efficiently, without constructing lists or sorting. |