DRYing iso_dict.py