[New-bugs-announce] [issue10630] dict_proxy.keys() / values() / items() are lists

Daniel Urban report at bugs.python.org
Sun Dec 5 17:19:06 CET 2010

New submission from Daniel Urban <urban.dani+py at gmail.com>:

The keys, values and items methods of dict_proxy return a list, while dict.keys, etc. return dictionary views (dict_keys, etc.). dict_proxy is used as the __dict__ attribute of classes. This is documented at http://docs.python.org/dev/py3k/reference/datamodel.html under "Custom classes" as "Special attributes: ... __dict__ is the dictionary containing the class’s namespace ..." While __dict__ is not actually dict, it probably should behave like a dict as close as possible. For example set operations work for dict.keys(), but not for dict_proxy.keys().

components: Interpreter Core
messages: 123427
nosy: durban
priority: normal
severity: normal
status: open
title: dict_proxy.keys() / values() / items() are lists
type: behavior
versions: Python 3.1, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list