Issue 1011: Wrong documentation for rfc822.Message.getheader (original) (raw)

In http://docs.python.org/lib/message-objects.html, 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.