New submission from Daniel Urban <urban.dani...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue10630>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to