From: Javier Sancho Date: Fri, 11 May 2018 10:36:12 +0000 (+0200) Subject: Return default __getitem__ when label is a string X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=ecde481300b6a3d5c04febe4b5b770556c8d0708;p=datasette-pytables.git Return default __getitem__ when label is a string --- diff --git a/datasette_pytables/__init__.py b/datasette_pytables/__init__.py index 5e37c45..3c71267 100644 --- a/datasette_pytables/__init__.py +++ b/datasette_pytables/__init__.py @@ -105,6 +105,8 @@ class Row(OrderedDict): def __getitem__(self, label): if type(label) is int: return super(OrderedDict, self).__getitem__(list(self.keys())[label]) + else: + return super(OrderedDict, self).__getitem__(label) def __iter__(self): return self.values().__iter__()