Rémi Lapeyre <remi.lape...@henki.fr> added the comment:

Here's how you can rewrite your code so it is more explicit:

Python 3.7.2 (default, Feb 12 2019, 08:15:36)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from email.mime.text import MIMEText
>>> msg = MIMEText('<div/>', 'html')
>>> msg.add_header('To', "this.email.shouldnt.be.prin...@nokia.com")
>>> msg.add_header('To', "valid.em...@nokia.com")
>>> print(msg.get_all('To'))
['this.email.shouldnt.be.prin...@nokia.com', 'valid.em...@nokia.com']

----------
versions: +Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36303>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to