[New-bugs-announce] [issue4243] has_key doc could be clearer

Terry J. Reedy report at bugs.python.org
Thu Oct 30 18:48:25 CET 2008

New submission from Terry J. Reedy <tjreedy at udel.edu>:

2.6 lib ref builtin types, mappings, has_key doc now says
"dict.has_key(key) is equivalent to key in d, but deprecated."
Posters on c.l.p found this confusing.  Which is deprecated?
I agree that this could be confusing to a beginner.

D'Arcy J.M. Cain suggests
"dict.has_key(key) is deprecated.  Use "key in dict" instead."
Or "Use the replacement ..."
Or "Use the new version ..."

assignee: georg.brandl
components: Documentation
messages: 75374
nosy: georg.brandl, tjreedy
severity: normal
status: open
title: has_key doc could be clearer
versions: Python 2.6, Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list