Commit 7270dfa0 authored by Franziska Koehn's avatar Franziska Koehn
Browse files

(str, unicode) to str

parent 0353a431
......@@ -41,7 +41,7 @@ def get_column(jdata, col, val_pattern='*'):
jdata = [jdata]
if val_pattern == '*':
return [entry[col] for entry in jdata if entry.has_key(col)]
return [entry[col] for entry in jdata if col in entry]
else:
return [entry[col] for entry in jdata
if fnmatch(entry.get(col), val_pattern)
......@@ -159,7 +159,7 @@ class JsonTable(object):
return iter(self.data)
def __getitem__(self, name):
if isinstance(name, (str, unicode)):
if isinstance(name, str):
return self.get(name)
elif isinstance(name, int):
return self.__class__([self.data[name]], self.order_by)
......
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