On 19Jul2019 01:18, Nicolas Sebrecht <[email protected]> wrote:
On Thu, Jul 18, 2019 at 01:34:46PM +0300, gwn wrote:
So that the hook can implement advanced features that acts on the
newly synced mail content.
[...]
if self.newmail_hook != None:
BTW, this check should be merged with the 'have_newmail' check.
Is there a reason this is not "is not" instead of "!=" ?
If you're being Pythonic, a plain "if self.newmail_hook:" would suffice,
but an equality check with None is very meaningful. It is a singleton,
so you should be using "is" or falling back to the unadorned
truthy/falsey bare "if self.newmail_hook:".
Cheers,
Cameron Simpson <[email protected]>
_______________________________________________
OfflineIMAP-project mailing list: [email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/offlineimap-project
OfflineIMAP homepages:
- https://github.com/OfflineIMAP
- http://offlineimap.org