Is this mailbox manipulation working by luck, or can't I understand my own code?

Peter J. Holzer hjp-python at hjp.at
Sat Oct 13 12:46:43 EDT 2018


On 2018-10-13 17:28:27 +0100, Chris Green wrote:
>     ('msg.get.__doc__ =', 'Get a header value.\n\n        Like
>     __getitem__() but return failobj instead of None when the field\n
>      is missing.\n        ')
> 
> However it isn't mentioned *anywhere* in the documentation that I can
> see.  There's only __getitem__() and get() for the mailbox class which
> operate on a whole mailbox and return a whole message.`

The documentation for mailbox.mboxMessage refers to mailbox.Message,
which refers to email.message.Message, which documents the get method:

https://docs.python.org/3/library/email.compat32-message.html#email.message.Message.get

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp at hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20181013/3ca3ee75/attachment.sig>


More information about the Python-list mailing list