This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cryvate
Recipients barry, bpoaugust, cryvate, r.david.murray
Date 2017-09-21.10:41:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
To me the documentation doesn't quite look right, in the case of no factory being passed, it runs:

    def __getitem__(self, key):
        """Return the keyed message; raise KeyError if it doesn't exist."""
        if not self._factory:
            return self.get_message(key)
            return self._factory(self.get_file(key))

from the Mailbox base class. The get_message is thus:

    def get_message(self, key):
        """Return a Message representation or raise a KeyError."""
        start, stop = self._lookup(key)
        from_line = self._file.readline().replace(linesep, b'')
        string = - self._file.tell())
        msg = self._message_factory(string.replace(linesep, b'\n'))
        return msg

where self._message_factory is set to mailbox.mboxMessage.

I am not familiar with this module, so am unsure whether the documentation is ill-worded or it is a bug.
Date User Action Args
2017-09-21 10:41:29cryvatesetrecipients: + cryvate, barry, r.david.murray, bpoaugust
2017-09-21 10:41:29cryvatesetmessageid: <>
2017-09-21 10:41:29cryvatelinkissue31538 messages
2017-09-21 10:41:29cryvatecreate