Author rhettinger
Recipients adrien-saladin, barry, berker.peksag, kxroberto, python-dev, r.david.murray, rhettinger
Date 2016-06-12.21:19:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465766347.86.0.583183306903.issue10839@psf.upfronthosting.co.za>
In-reply-to
Content
Would you consider raising an exception at least for the case of a "To:" header or perhaps a warning or someother failsafe.

Using __setitem__ for appending instead of replacement is surprising and in the case of LetsEncrypt was a small disaster.   There is a docstring explaining what is going on but that typically isn't visible to the user of the square brackets operator.

For Python3.6, I think there should be an alternative API that doesn't use the square brackets operator:   add_header, replace_header, remove_header or somesuch.  The problem is that square brackets never suggests appending which is what is actually happening.
History
Date User Action Args
2016-06-12 21:19:07rhettingersetrecipients: + rhettinger, barry, kxroberto, r.david.murray, adrien-saladin, python-dev, berker.peksag
2016-06-12 21:19:07rhettingersetmessageid: <1465766347.86.0.583183306903.issue10839@psf.upfronthosting.co.za>
2016-06-12 21:19:07rhettingerlinkissue10839 messages
2016-06-12 21:19:07rhettingercreate