Return default __getitem__ when label is a string
authorJavier Sancho <jsf@jsancho.org>
Fri, 11 May 2018 10:36:12 +0000 (12:36 +0200)
committerJavier Sancho <jsf@jsancho.org>
Fri, 11 May 2018 10:36:12 +0000 (12:36 +0200)
datasette_pytables/__init__.py

index 5e37c45..3c71267 100644 (file)
@@ -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__()