[docs] [issue27544] Document checking dict types

hannah report at bugs.python.org
Sun Jul 17 21:25:16 EDT 2016


New submission from hannah:

While there is documentation that dict.keys(), dict.values(), and dict.items() are now view objects(https://docs.python.org/3/library/stdtypes.html#dict-views), there's no mention dictviews, dict_keys, dict_values, and dict_items not being built-ins. This is confusing because type(dict.keys()) returns dict_keys, type(dict.values()) returns dict_values, etc., and the documentation uses `dictview` as the object signature, and so it's unclear how to do object introspection on dictview objects. 

The #python-dev channel suggested that the canonical way to do the object introspection is to use the collections.abc.mapview types; the documentation for dicts should reflect this (and that dictview and the rest are not __builtin__ types/in the python namspace).

----------
assignee: docs at python
components: Documentation
messages: 270672
nosy: docs at python, story645
priority: normal
severity: normal
status: open
title: Document checking dict types
type: enhancement
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

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


More information about the docs mailing list