mirror of
https://github.com/tildeclub/ttbp.git
synced 2026-06-21 19:59:25 +00:00
code cleanup
adding more code comments, cleaning up deprecated code, improving general readability
This commit is contained in:
@@ -39,8 +39,21 @@ LANG = json.load(langfile)
|
||||
langfile.close()
|
||||
|
||||
def say(keyword):
|
||||
'''
|
||||
takes a keyword and randomly returns from language dictionary to match that keyword
|
||||
|
||||
return random.choice(LANG.get(keyword))
|
||||
returns None if keyword doesn't exist
|
||||
|
||||
TODO: validate keyword?
|
||||
'''
|
||||
|
||||
return random.choice(LANG.get(keyword))
|
||||
|
||||
def month(num):
|
||||
return LANG["months"].get(num)
|
||||
'''
|
||||
takes a MM and returns lovercase full name of that month
|
||||
|
||||
TODO: validate num?
|
||||
'''
|
||||
|
||||
return LANG["months"].get(num)
|
||||
|
||||
Reference in New Issue
Block a user