[issue32657] Mutable Objects in SMTP send_message Signature

Steven D'Aprano report at bugs.python.org
Thu Jan 25 02:00:02 EST 2018


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Hi Kenny, and thanks, but I'm not sure what your point is. Are you claiming this is a bug in the code or the documentation?

For what it is worth... mutable defaults *are* a "gotcha", so the documentation isn't wrong. And mutable defaults are *not* illegal nor a bug and are occasionally useful. So I'm not sure why you are reporting this? Have you found a problem?

(I see that send_message gives rcpt_options a default of {} (empty dict) and then passes it to sendmail, which expects rcpt_options to be a list. I don't know if that matters.)

----------
nosy: +steven.daprano

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


More information about the Python-bugs-list mailing list