comparison roundup/cgi/TAL/TALDefs.py @ 5381:0942fe89e82e

Python 3 preparation: change "x.has_key(y)" to "y in x". (Also likewise "not in" where appropriate.) Tool-generated patch.
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 22:08:17 +0000
parents 12fe83f90f0d
children 7172c201dec2
comparison
equal deleted inserted replaced
5380:64c4e43fbb84 5381:0942fe89e82e
124 if not m: 124 if not m:
125 raise TALError("Bad syntax in attributes: " + repr(part)) 125 raise TALError("Bad syntax in attributes: " + repr(part))
126 name, expr = m.group(1, 2) 126 name, expr = m.group(1, 2)
127 if not xml: 127 if not xml:
128 name = name.lower() 128 name = name.lower()
129 if dict.has_key(name): 129 if name in dict:
130 raise TALError("Duplicate attribute name in attributes: " + repr(part)) 130 raise TALError("Duplicate attribute name in attributes: " + repr(part))
131 dict[name] = expr 131 dict[name] = expr
132 return dict 132 return dict
133 133
134 def parseSubstitution(arg, position=(None, None)): 134 def parseSubstitution(arg, position=(None, None)):

Roundup Issue Tracker: http://roundup-tracker.org/