'Similar to :meth:`dict.get`--returns the value associated with keyword
in the header, or a default value if the keyword is not found.
Parameters
key : str
A keyword that may or may not be in the header.
default : optional
A default value to return if the keyword is not found in the
header.
Returns
value
The value associated with the given keyword, or the default value
if the keyword is not in the header.'

def get(self, key, default=None):

    try:
        return self[key]
    except (KeyError, IndexError):
        return default
