Message228128
I am trying to create an email address as in the Python doc example
https://docs.python.org/3/library/email-examples.html
The example does not work as given on the page.
I tried Python 3.4rc1 and the 3.5 compiled from source on Ubuntu 12.
I found two possible reasons:
1) Python bug in headerregistry.py
The string resulting from the command below contains extra quotes:
str(Address('Foo Example', 'foo@example.com'))
--> 'Foo Example <"foo@example.com">'
2) Documentation bug
The documentation of headerregistry.Address states:
"username and domain may be specified together by using
the addr_spec keyword *instead of* the username and domain keywords"
However, this is inconsistent with example 19.1.14.1. on
https://docs.python.org/3/library/email-examples.html
Attached are two tests that reproduce the situation.
The first test below fails but the second passes.
Conclusion:
In my opinion, it is more intuitive if the following would work as well:
Address('Foo Example', 'foo@example.com') |
|
Date |
User |
Action |
Args |
2014-10-01 21:25:24 | krother | set | recipients:
+ krother, barry, r.david.murray |
2014-10-01 21:25:24 | krother | set | messageid: <1412198724.14.0.970145330248.issue22535@psf.upfronthosting.co.za> |
2014-10-01 21:25:24 | krother | link | issue22535 messages |
2014-10-01 21:25:23 | krother | create | |
|