Kaydet (Commit) 8cdee961 authored tarafından Fred Drake's avatar Fred Drake

Dictionaries are created using the "{...}" notation, not the "..."

notation.  Problem reported by Magnus L. Hetland <mlh@idt.ntnu.no>.
üst 3366d1c7
...@@ -339,21 +339,20 @@ There is currently a single intrinsic mapping type: ...@@ -339,21 +339,20 @@ There is currently a single intrinsic mapping type:
\begin{description} \begin{description}
\item[Dictionaries] \item[Dictionaries]
These represent finite sets of objects indexed by nearly arbitrary These\obindex{dictionary} represent finite sets of objects indexed by
values. The only types of values not acceptable as keys are values nearly arbitrary values. The only types of values not acceptable as
containing lists or dictionaries or other mutable types that are keys are values containing lists or dictionaries or other mutable
compared by value rather than by object identity, the reason being types that are compared by value rather than by object identity, the
that the efficient implementation of dictionaries requires a key's reason being that the efficient implementation of dictionaries
hash value to remain constant. requires a key's hash value to remain constant.
Numeric types used for keys obey the normal rules for numeric Numeric types used for keys obey the normal rules for numeric
comparison: if two numbers compare equal (e.g., \code{1} and comparison: if two numbers compare equal (e.g., \code{1} and
\code{1.0}) then they can be used interchangeably to index the same \code{1.0}) then they can be used interchangeably to index the same
dictionary entry. dictionary entry.
Dictionaries are mutable; they are created by the \code{...} Dictionaries are \obindex{mutable}mutable; they are created by the
notation (see section \ref{dict}, ``Dictionary Displays''). \code{\{...\}} notation (see section \ref{dict}, ``Dictionary
\obindex{dictionary} Displays'').
\obindex{mutable}
The extension modules \module{dbm}\refstmodindex{dbm}, The extension modules \module{dbm}\refstmodindex{dbm},
\module{gdbm}\refstmodindex{gdbm}, \module{bsddb}\refstmodindex{bsddb} \module{gdbm}\refstmodindex{gdbm}, \module{bsddb}\refstmodindex{bsddb}
...@@ -362,12 +361,11 @@ provide additional examples of mapping types. ...@@ -362,12 +361,11 @@ provide additional examples of mapping types.
\end{description} % Mapping types \end{description} % Mapping types
\item[Callable types] \item[Callable types]
These are the types to which the function call operation (see section These\obindex{callable} are the types to which the function call
\ref{calls}, ``Calls'') can be applied: operation (see section \ref{calls}, ``Calls'') can be applied:
\indexii{function}{call} \indexii{function}{call}
\index{invocation} \index{invocation}
\indexii{function}{argument} \indexii{function}{argument}
\obindex{callable}
\begin{description} \begin{description}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment