mirror of https://github.com/python/cpython
Issue 21469: Minor code modernization (convert and/or expression to an if/else expression).
Suggested by: Tal Einat
This commit is contained in:
parent
51669d8c18
commit
38acd4c028
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue