New submission from jal <loic.jaquemet+pyt...@gmail.com>:

>From documentation : 
http://docs.python.org/library/email.message.html?highlight=email#email.message.Message.get_payload

get_payload([i[, decode]])

"With optional argument i,[..] If the payload is a string (i.e.
is_multipart() is False) and i is given, a TypeError is raised."

and 

"Optional decode is a flag [..] When True and the message is not a
multipart, the payload will be decoded if this header’s value is
quoted-printable or base64. [..]"

Now the bug : 
On a non-multipart b64 email,
how can the second-level-option "decode" be used, when using
first-level-optional 'i' throws an exception...

Two fixes possible : 
a) code fix
b) documentation fix

----------
assignee: georg.brandl
components: Documentation
messages: 87353
nosy: georg.brandl, trolldbois
severity: normal
status: open
title: email.message : get_payload args's documentation is confusing
type: behavior
versions: Python 2.6

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

Reply via email to