[issue5951] email.message : get_payload args's documentation is confusing

2009-05-17 Thread Georg Brandl

Georg Brandl  added the comment:

Will be fixed along with all other such instances.

--
resolution:  -> postponed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5951] email.message : get_payload args's documentation is confusing

2009-05-07 Thread R. David Murray

R. David Murray  added the comment:

No fault of yours, it's a real doc bug.  I've been programming in python
since 1997 or so, and I had to read the source code to figure it out
when I went to use get_payload a couple months ago.  That's why your bug
report caught my eye.  And even then I misremembered the answer and had
to look at the source code again to get it right.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5951] email.message : get_payload args's documentation is confusing

2009-05-07 Thread Loic Jaquemet

Loic Jaquemet  added the comment:

Ok, I understand.
Thx

+ -> I need to learn python 
:/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5951] email.message : get_payload args's documentation is confusing

2009-05-06 Thread R. David Murray

R. David Murray  added the comment:

The answer is that you do msg.get_payload(decode=True).  The doc needs
to be changed over to use keyword argument specification syntax, which I
think would make that obvious.

--
nosy: +r.david.murray
versions:  -Python 2.4, Python 2.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5951] email.message : get_payload args's documentation is confusing

2009-05-06 Thread jal

Changes by jal :


--
versions: +Python 2.4, Python 2.5, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5951] email.message : get_payload args's documentation is confusing

2009-05-06 Thread jal

New submission from jal :

>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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com