Skip to content

Commit 6bd6571

Browse files
committed
improved readability
1 parent d371f2b commit 6bd6571

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎factory_method.py‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ def __init__(self):
1313

1414
def get(self, msgid):
1515
"""We'll punt if we don't have a translation"""
16-
try:
17-
return self.trans[msgid]
18-
except KeyError:
19-
return str(msgid)
16+
return self.trans.get(msgid, str(msgid))
2017

2118

2219
class EnglishGetter:

0 commit comments

Comments
 (0)