Author webknjaz
Recipients barry, louielu, r.david.murray, serhiy.storchaka, webknjaz
Date 2017-04-17.19:45:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492458347.02.0.489065854648.issue30088@psf.upfronthosting.co.za>
In-reply-to
Content
> create a Maildir folder in a temporary directory:
> 
>     with tempfile.TemporaryDirectory() as tmpdir:
>         with mailbox.Maildir(os.path.join(tmpdir, 'mail'), create=True) as box:
>             ...

Yeah, I came up with the same solution. It just seems weird to me.

The doc says "If create is True, the mailbox is created if it does not exist.". So it operates the term mailbox, not a folder.

I would assume that a valid mailbox [1] is the whole **valid** directory structure with subfolders. If the corresponding subdirs are missing the folder should not be considered as a valid maildir, right?

Given above, I think the documentation doesn't clearly promise the same behavior that the code does. Shouldn't this be fixed? (Either docs, or code)

[1] http://www.qmail.org/man/man5/maildir.html
History
Date User Action Args
2017-04-17 19:45:47webknjazsetrecipients: + webknjaz, barry, r.david.murray, serhiy.storchaka, louielu
2017-04-17 19:45:47webknjazsetmessageid: <1492458347.02.0.489065854648.issue30088@psf.upfronthosting.co.za>
2017-04-17 19:45:47webknjazlinkissue30088 messages
2017-04-17 19:45:46webknjazcreate