Gabriel, <snipped> If you can guarantee the identifiers are all lowercase inside the dictionary:
class lowercase_dict(dict): def __getitem__(self, name): return dict.__getitem__(self, name.lower()) import string values = lowercase_dict( name='John Doe', phone='999-555-1212' ) output = string.Template( 'My name is $NAME and my phone is $Phone.' ).safe_substitute( values ) </snipped> Brilliant!! Using a custom dictionary solves my problem and gives me some ideas on similar challenges. Thank you! Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list