From 08f6f476d9be8a14b0f8ab8d827c417f5686f2e1 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 5 Sep 2006 12:45:18 +0000 Subject: [PATCH] Bug #1552618: change docs of dict.has_key() to reflect recommendation to use "in". (backport from rev. 51740) --- Doc/lib/libstdtypes.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index 83fa92c2e26..84ca938ae68 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -1410,15 +1410,15 @@ arbitrary objects): {(1)} \lineiii{\var{a}.clear()}{remove all items from \code{a}}{} \lineiii{\var{a}.copy()}{a (shallow) copy of \code{a}}{} - \lineiii{\var{a}.has_key(\var{k})} + \lineiii{\var{k} in \var{a}} {\code{True} if \var{a} has a key \var{k}, else \code{False}} - {} - \lineiii{\var{k} \code{in} \var{a}} - {Equivalent to \var{a}.has_key(\var{k})} {(2)} \lineiii{\var{k} not in \var{a}} - {Equivalent to \code{not} \var{a}.has_key(\var{k})} + {Equivalent to \code{not} \var{k} in \var{a}} {(2)} + \lineiii{\var{a}.has_key(\var{k})} + {Equivalent to \var{k} \code{in} \var{a}, use that form in new code} + {} \lineiii{\var{a}.items()} {a copy of \var{a}'s list of (\var{key}, \var{value}) pairs} {(3)}