Stefan Ram <[email protected]> wrote:
> Chris Green <[email protected]> writes:
> >msg.get
>
> You can get some information about »get«:
>
> print( "msg.get.__doc__ =", msg.get.__doc__ )
> print( "msg.get.__func__ =", msg.get.__func__ )
> print( "msg.get.__self__ =", msg.get.__self__ )
> print( "msg.get.__str__() =", msg.get.__str__() )
> print( "msg.get.__repr__() =", msg.get.__repr__() )
> print( "msg.get.__name__ =", msg.get.__name__ )
> import dis
> dis.dis( msg.get )
> dis.show_code( msg.get )
>
Thanks, yes, this tells me a little:-
('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.`
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list