From a43677a3e61cc25631cc050175791a13b2f9cf61 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Tue, 30 Aug 2011 11:01:17 +0200 Subject: [PATCH] Shorten self.infosep assignment A more pythonic and less verbose way to do the same. Add a comment what the variable is all about. Signed-off-by: Sebastian Spaeth --- offlineimap/folder/Maildir.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/offlineimap/folder/Maildir.py b/offlineimap/folder/Maildir.py index 2bfd394..f26b07e 100644 --- a/offlineimap/folder/Maildir.py +++ b/offlineimap/folder/Maildir.py @@ -68,11 +68,8 @@ class MaildirFolder(BaseFolder): self.wincompatible = self.config.getdefaultboolean( "Account "+self.accountname, "maildir-windows-compatible", False) - if self.wincompatible == False: - self.infosep = ':' - else: - self.infosep = '!' - + self.infosep = '!' if self.wincompatible else ':' + """infosep is the separator between maildir name and flag appendix""" self.flagmatchre = re.compile(self.infosep + '.*2,([A-Z]+)') #self.ui is set in BaseFolder.init() # Cache the full folder path, as we use getfullname() very often