Przeglądaj źródła

Update factory_method.py

as the 'language' argument is a keyword argument in the function definition, for the sake of completeness should also be called with keyword arguments.
Michal 10 lat temu
rodzic
commit
b4b91f4441
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      factory_method.py

+ 1 - 1
factory_method.py

@@ -33,7 +33,7 @@ def get_localizer(language="English"):
     return languages[language]()
 
 # Create our localizers
-e, g = get_localizer("English"), get_localizer("Greek")
+e, g = get_localizer(language="English"), get_localizer(language="Greek")
 # Localize some text
 for msgid in "dog parrot cat bear".split():
     print(e.get(msgid), g.get(msgid))