Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e75e17

Browse files
committed
Two minor nits from Gerry Weiner (no working email address) about
describing the methods of dictionaries.
1 parent b8aa261 commit 1e75e17

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/lib/libstdtypes.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,8 @@ \subsection{Mapping Types \label{typesmapping}}
569569
\begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes}
570570
\lineiii{len(\var{a})}{the number of items in \var{a}}{}
571571
\lineiii{\var{a}[\var{k}]}{the item of \var{a} with key \var{k}}{(1)}
572-
\lineiii{\var{a}[\var{k}] = \var{x}}
573-
{set \code{\var{a}[\var{k}]} to \var{x}}
572+
\lineiii{\var{a}[\var{k}] = \var{v}}
573+
{set \code{\var{a}[\var{k}]} to \var{v}}
574574
{}
575575
\lineiii{del \var{a}[\var{k}]}
576576
{remove \code{\var{a}[\var{k}]} from \var{a}}
@@ -585,7 +585,7 @@ \subsection{Mapping Types \label{typesmapping}}
585585
{(2)}
586586
\lineiii{\var{a}.keys()}{a copy of \var{a}'s list of keys}{(2)}
587587
\lineiii{\var{a}.update(\var{b})}
588-
{\code{for k, v in \var{b}.items(): \var{a}[k] = v}}
588+
{\code{for k in \var{b}.keys(): \var{a}[k] = \var{b}[k]}}
589589
{(3)}
590590
\lineiii{\var{a}.values()}{a copy of \var{a}'s list of values}{(2)}
591591
\lineiii{\var{a}.get(\var{k}\optional{, \var{x}})}

0 commit comments

Comments
 (0)