osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


Stefan Ram <ram at zedat.fu-berlin.de> wrote:
> Chris Green <cl at isbd.net> 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
?