diff options
author | Guido van Rossum <guido@python.org> | 2002-09-04 11:29:45 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-09-04 11:29:45 (GMT) |
commit | efae8862feed2748e5c892b1d638d1d6344914f2 (patch) | |
tree | 386cd7fb61966dd5a5ea5ba6581d9bd02fd9f9d3 /Objects | |
parent | 979c74b9690e4f6147ce1ecb01910dba26e96685 (diff) | |
download | cpython-efae8862feed2748e5c892b1d638d1d6344914f2.zip cpython-efae8862feed2748e5c892b1d638d1d6344914f2.tar.gz cpython-efae8862feed2748e5c892b1d638d1d6344914f2.tar.bz2 |
In doc strings, use 'k in D' rather than D.has_key(k).
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/dictobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index b7b499e..e9726cf 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1658,10 +1658,10 @@ PyDoc_STRVAR(has_key__doc__, "D.has_key(k) -> 1 if D has a key k, else 0"); PyDoc_STRVAR(get__doc__, -"D.get(k[,d]) -> D[k] if D.has_key(k), else d. d defaults to None."); +"D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."); PyDoc_STRVAR(setdefault_doc__, -"D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if not D.has_key(k)"); +"D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D"); PyDoc_STRVAR(pop__doc__, "D.pop(k) -> v, remove specified key and return the corresponding value"); |