Issue 21469: Minor code modernization (convert and/or expression to an if/else expression).

Suggested by: Tal Einat
This commit is contained in:
Raymond Hettinger 2014-05-12 22:22:46 -07:00
parent 51669d8c18
commit 38acd4c028
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ class RuleLine:
return self.path == "*" or filename.startswith(self.path)
def __str__(self):
return (self.allowance and "Allow" or "Disallow") + ": " + self.path
return ("Allow" if self.allowance else "Disallow") + ": " + self.path
class Entry: