- def __init__(self, path=None, create=False, status= MODE_READ_ONLY):
- """ Open or create a notmuch database
-
- If path is None, we will try to read a users notmuch configuration and
- use his default database.
- Throws a NotmuchError in case of failure.
+ def __init__(self, path=None, create=False, mode= MODE.READ_ONLY):
+ """If *path* is *None*, we will try to read a users notmuch
+ configuration and use his default database. If *create* is `True`,
+ the database will always be created in
+ :attr:`MODE`.READ_WRITE mode.
+
+ :param path: Directory to open/create the database in (see
+ above for behavior if `None`)
+ :type path: `str` or `None`
+ :param create: False to open an existing, True to create a new
+ database.
+ :type create: bool
+ :param mode: Mode to open a database in. Always
+ :attr:`MODE`.READ_WRITE when creating a new one.
+ :type mode: :attr:`MODE`
+ :returns: Nothing
+ :exception: :exc:`NotmuchError` in case of failure.