[New-bugs-announce] [issue40890] Dict views should be introspectable

Raymond Hettinger report at bugs.python.org
Sat Jun 6 13:21:19 EDT 2020


New submission from Raymond Hettinger <raymond.hettinger at gmail.com>:

Dict views wrap an underlying mapping but don't expose that mapping as an attribute.

Traditionally, we do expose wrapped objects:  property() exposes fget,  partial() exposes func, bound methods expose __func__, ChainMap() exposes maps, etc.

Exposing this attribute would help with introspection, making it possible to write efficient functions that operate on dict views.

----------
components: Interpreter Core
keywords: easy (C)
messages: 370841
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Dict views should be introspectable
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40890>
_______________________________________


More information about the New-bugs-announce mailing list