Skip to content
Snippets Groups Projects
Commit 7192921a authored by Martin Mareš's avatar Martin Mareš
Browse files

Řetězce není dobré porovnávat pomocí "is"

parent 560eaad5
No related branches found
No related tags found
No related merge requests found
...@@ -13,15 +13,15 @@ class PlaceLevel: ...@@ -13,15 +13,15 @@ class PlaceLevel:
def name_genitive(self, m="", f="", n="") -> str: def name_genitive(self, m="", f="", n="") -> str:
w = {'m': m, 'f': f, 'n': n}[self.genus] w = {'m': m, 'f': f, 'n': n}[self.genus]
return (w + ' ' if w is not '' else '') + self.name_gen return (w + ' ' if w != '' else '') + self.name_gen
def name_accusative(self, m="", f="", n="") -> str: def name_accusative(self, m="", f="", n="") -> str:
w = {'m': m, 'f': f, 'n': n}[self.genus] w = {'m': m, 'f': f, 'n': n}[self.genus]
return (w + ' ' if w is not '' else '') + self.name_acc return (w + ' ' if w != '' else '') + self.name_acc
def name_locative(self, m="", f="", n="") -> str: def name_locative(self, m="", f="", n="") -> str:
w = {'m': m, 'f': f, 'n': n}[self.genus] w = {'m': m, 'f': f, 'n': n}[self.genus]
return (w + ' ' if w is not '' else '') + self.name_loc return (w + ' ' if w != '' else '') + self.name_loc
def in_name(self) -> str: def in_name(self) -> str:
return self.in_prep + ' ' + self.name_loc return self.in_prep + ' ' + self.name_loc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment