Sfoglia il codice sorgente

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 anni fa
parent
commit
b4b91f4441
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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))