My python program uses dicts and there are a massive amount of "if" statements just for checking the type of the retrieved value.
I want to avoid this but instead do it a more programatically correct way.
Here is an example:
# golddb should only contain str keys and int values
golddb = dict()
def gainGold(playername):
global golddb
golddb[playername] += 1 # error may happen if I try to += a non-int type
golddb[playername] = "hello" # I want python to give an error when I try to assign a str to be a value in the dict