'Comparisons work either on string comparing folder names or
on the same instance.
MailDirFolder(\'foo\') == \'foo\' --> True
a = MailDirFolder(\'foo\'); a == b --> True
MailDirFolder(\'foo\') == \'moo\' --> False
MailDirFolder(\'foo\') == IMAPFolder(\'foo\') --> False
MailDirFolder(\'foo\') == MaildirFolder(\'foo\') --> False'

def __eq__(self, other):

    if isinstance(other, str):
        return (other == self.name)
    return (id(self) == id(other))
