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

kxroberto report at bugs.python.org
Sun Jan 1 18:38:49 CET 2012


kxroberto <kxroberto at users.sourceforge.net> added the comment:

I think really ill/strange is that kind of item _assignments_  do _add_ multiple.

If   msg[field] = xy    would just add-first/replace-frist , and only msg.add_xxxx/.append(field, xy)  would  add multiples that would be clear and understandable/readable. 
(The sophisticated check dictionary is unnecessary IMHO, I don't expect the class to be ever smart enough for a full RFC checklist.)

e.g. I remember a bug like

msg[field] = xy
if special_condition:
     msg[field] = abc   # just wanted a alternative


Never ever expected a double header here!

"="  with adding behavior is absurd IMHO. Certainly doesn't allow readable code.

----------
nosy: +kxroberto

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


More information about the Python-bugs-list mailing list