[docs] [issue10357] ** and "mapping" are poorly defined in python docs

Raymond Hettinger report at bugs.python.org
Tue Nov 9 00:13:21 CET 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

> Even if the glossary pointed to collections.html, 
> there are far more methods specified there than 
> are needed to be **able.

That is an implementation detail and is subject to
change.  If someone supplies an argument satisfying
collections.Mapping, that should be sufficient across
all implementations.

> dict.update's doc string is explicit about what 
> it requires from the argument:

Duck-typing is still allowed when explicit requirements
have been exposed (we do this a lot with .readline() for
example).  For the most part though, we want to specify
"needs a Mapping" in the sense of collections.Mapping.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10357>
_______________________________________


More information about the docs mailing list