[issue10839] email module should not allow some header field repetitions

Barry A. Warsaw report at bugs.python.org
Mon Jun 13 01:24:02 EDT 2016


Barry A. Warsaw added the comment:

On Jun 13, 2016, at 12:09 AM, Martin Panter wrote:

>I think I would support deprecating the __setitem__() etc methods, perhaps
>with a cleanup of the alternatives, e.g. add remove_all(). Also,
>__getitem__() is equivalent to get(), which does not raise KeyError. Although
>according to Issue 12111, David said things are unlikely to change.

I do not support deprecating __setitem__().  I'm okay with developing an
alternative API, but setitem syntax is just too pervasive and convenient.
It's been there since the very earliest days of mimelib (the precursor to the
email package).  If you read and understand the docs, you know exactly what
the semantics are and you know how to use it effectively and safely.

----------

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


More information about the Python-bugs-list mailing list