Commit 09db85b3 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix PropertyDict.has_key() in Python 2

parent f6c1f995
......@@ -1459,15 +1459,15 @@ class PropertyDict(object):
if k[0] == self.t:
yield k[0]
def haskey(self, key):
return self.properties.haskey(key)
def items(self):
for k, v in self.properties.items():
if k[0] == self.t:
yield k[1], v
if sys.version_info < (3,):
def has_key(self, key):
return self.properties.has_key((self.t, key))
def iteritems(self):
for k, v in self.properties.iteritems():
if k[0] == self.t:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment