summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorPablo Aguiar <scorphus@gmail.com>2018-09-07 22:04:48 (GMT)
committerPablo Galindo <Pablogsal@gmail.com>2018-09-07 22:04:48 (GMT)
commitd5fbe9b1a3d65ceeb9159c5ba999ee966a945f76 (patch)
treef2124d01569a59c8bc937f02a0954b9f2f807e1f /Doc
parent4e519377b1b84c9414a360961276993d24198825 (diff)
downloadcpython-d5fbe9b1a3d65ceeb9159c5ba999ee966a945f76.zip
cpython-d5fbe9b1a3d65ceeb9159c5ba999ee966a945f76.tar.gz
cpython-d5fbe9b1a3d65ceeb9159c5ba999ee966a945f76.tar.bz2
bpo-34246: Use no mutable default args in smtplib (GH-8554)
Some methods of the SMTP class use mutable default arguments. Specially `send_message` is affected as it mutates one of the args by appending items to it, which has side effects on further calls.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/smtplib.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst
index e5effd0..8052172 100644
--- a/Doc/library/smtplib.rst
+++ b/Doc/library/smtplib.rst
@@ -419,7 +419,7 @@ An :class:`SMTP` instance has the following methods:
:exc:`SMTPException`.
-.. method:: SMTP.sendmail(from_addr, to_addrs, msg, mail_options=[], rcpt_options=[])
+.. method:: SMTP.sendmail(from_addr, to_addrs, msg, mail_options=(), rcpt_options=())
Send mail. The required arguments are an :rfc:`822` from-address string, a list
of :rfc:`822` to-address strings (a bare string will be treated as a list with 1
@@ -491,7 +491,7 @@ An :class:`SMTP` instance has the following methods:
.. method:: SMTP.send_message(msg, from_addr=None, to_addrs=None, \
- mail_options=[], rcpt_options=[])
+ mail_options=(), rcpt_options=())
This is a convenience method for calling :meth:`sendmail` with the message
represented by an :class:`email.message.Message` object. The arguments have