You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2013-08-09.20:22:20.859>created_at=<Date2013-07-30.15:19:20.951>labels= ['type-bug', 'expert-email', 'docs']
title="email.policy doc example passes 'policy' to as_string, but that doesn't work"updated_at=<Date2013-08-09.20:22:20.858>user='https://github.com/bitdancer'
When I wrote those docs I intended to add a policy argument to as_string, but did not do it by the time 3.3 was released. The docs for 3.3 need to be corrected, and I need to decide if I do want to add that keyword to as_string in 3.4 (the answer is probably yes, but I may check with the email-sig first).
Turns out even with as_string accepting a policy keyword, the example still failed. It needs to be generating a bytes object, not a string. Before I even realized that, though, I decided I wanted to add as_bytes (and __bytes__). So the attached patch does that: adds policy to as_string, and adds new methods as_bytes and __bytes__ to Message.
This patch is only for 3.4. The 3.3 patch will just delete that part of the policy example, so I'm not going to bother to upload it.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: