Anton Khirnov <[email protected]> writes: > > + def reopen(self, mode=None): > + """Reopen an opened notmuch database. > + > + This is primarily useful to recover from OperationInvalidatedError. > + """
The mode argument needs to be documented somewhere. > + if isinstance(mode, str): > + mode = self.STR_MODE_MAP[mode] > + else: > + mode = mode or self.mode > + self.mode = mode I see you are just copying what is done in the existing __init__ method, but I wonder if this isn't a bit fragile. If the user passes the wrong string, they will get a mysterious exception about the dictionary. _______________________________________________ notmuch mailing list -- [email protected] To unsubscribe send an email to [email protected]
