]> git.jsancho.org Git - datasette-pytables.git/commitdiff
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 5e37c45d451c21bd8711baafa4ace4c9380af5bb..3c71267e9f1144cff2d2c02c32c74264bc223a7d 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__()