This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Slightly incorrect doc for get_param method in Lib/email/message.py
Type: behavior Stage: resolved
Components: Documentation, email Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: barry, docs@python, python-dev, r.david.murray, vajrasky
Priority: normal Keywords: patch

Created on 2013-11-03 15:12 by vajrasky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix_doc_get_param_in_email_message.patch vajrasky, 2013-11-03 15:12 review
Messages (4)
msg202029 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2013-11-03 15:12
Lib/email/message.py, line 665 & 666:

    param = msg.get_param('foo')
    param = email.utils.collapse_rfc2231_value(rawparam)

Where does rawparam come from?

On top of that, sending the result of get_param to collapse_rfc2231_value can make it chokes if the result of get_param is None. I already proposed the change in collapse_rfc2231_value to handle None gracefully in another ticket #19063, though.
msg202032 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-11-03 16:10
Vajrasky: FYI, you can select the 'email' component for tickets like this, and I'll be automatically made nosy (as will Barry Warsaw).
msg202042 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-03 17:34
New changeset c574951deadd by R David Murray in branch '3.3':
#19485: clarify get_param example.
http://hg.python.org/cpython/rev/c574951deadd

New changeset e3180c58a78c by R David Murray in branch 'default':
Merge #19485: clarify get_param example.
http://hg.python.org/cpython/rev/e3180c58a78c
msg202043 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-11-03 17:35
Thanks, Vajrasky.  Looks like this was a cut and paste error when Barry updated the docs for 3.3, since it is correct in the 2.7 module.
History
Date User Action Args
2022-04-11 14:57:53adminsetgithub: 63684
2013-11-03 17:35:49r.david.murraysetstatus: open -> closed
resolution: fixed
messages: + msg202043

stage: resolved
2013-11-03 17:34:03python-devsetnosy: + python-dev
messages: + msg202042
2013-11-03 16:10:04r.david.murraysetversions: + Python 2.7, Python 3.3
nosy: + barry

messages: + msg202032

components: + email
type: behavior
2013-11-03 15:12:23vajraskysetnosy: + r.david.murray
2013-11-03 15:12:10vajraskycreate