Title: Wrong documentation for rfc822.Message.getheader
Type: Stage:
Components: Documentation Versions: Python 2.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, nirs
Priority: normal Keywords:

Created on 2007-08-24 13:33 by nirs, last changed 2007-08-24 17:23 by georg.brandl. This issue is now closed.

Messages (2)
msg55254 - (view) Author: Nir Soffer (nirs) * Date: 2007-08-24 13:33
In, getheader doc say:

 "Like getrawheader(name), but strip leading and trailing whitespace. 
Internal whitespace is not stripped. The optional default argument can 
be used to specify a different default to be returned when there is no 
header matching name."

However, getheader is not like getrawheader. getheader return the *last* 
header seen, using the message dict. getrawheader retruns the *first* 
header line seen, searching through the list of parsed header lines.

The text should also note that getheader is faster and the preferred way 
to get parsed headers.
msg55261 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-24 17:23
Thanks, fixed in rev. 57395.
Date User Action Args
2007-08-24 17:23:42georg.brandlsetstatus: open -> closed
assignee: georg.brandl
resolution: fixed
messages: + msg55261
nosy: + georg.brandl
2007-08-24 13:33:45nirscreate