[New-bugs-announce] [issue21991] The new email API should use MappingProxyType instead of returning new dicts.

R. David Murray report at bugs.python.org
Wed Jul 16 16:29:58 CEST 2014


New submission from R. David Murray:

There are a few places in the new email API where dicts are returned containing what is conceptually static information.  Currently this is done by returning a copy of the dict from the object, so that user code modifying the dict won't break the object invariants.  It would be better to change these to MappingProxyType objects instead, before the API moves out of provisional status.

This issue is mostly a note to myself, since I'm the most likely to be able to figure out which places in the code need changing, but if anyone else wants to look at it feel free, since it will probably be a while before I get to it.

----------
components: email
keywords: easy
messages: 223211
nosy: barry, r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: The new email API should use MappingProxyType instead of returning new dicts.
type: behavior
versions: Python 3.5

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


More information about the New-bugs-announce mailing list