From ecde481300b6a3d5c04febe4b5b770556c8d0708 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Fri, 11 May 2018 12:36:12 +0200 Subject: [PATCH] Return default __getitem__ when label is a string --- datasette_pytables/__init__.py | 2 ++ 1 file changed, 2 insertions(+) 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__() -- 2.39.5