Even if i put it in exactly the way you did: >>> import re >>> charmatcher = re.compile(r' [A-Z] [\d]?') >>> >>> ext = dict(D="V1", O="M1", G="S1") >>> std = dict(S="H") >>> >>> decode_replacements ={} >>> decode_replacements.update([(std[key], key) for key in std]) Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: keys
-- http://mail.python.org/mailman/listinfo/python-list