projects
/
datasette-pytables.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8902bef
)
Return default __getitem__ when label is a string
author
Javier Sancho
<jsf@jsancho.org>
Fri, 11 May 2018 10:36:12 +0000
(12:36 +0200)
committer
Javier Sancho
<jsf@jsancho.org>
Fri, 11 May 2018 10:36:12 +0000
(12:36 +0200)
datasette_pytables/__init__.py
patch
|
blob
|
history
diff --git
a/datasette_pytables/__init__.py
b/datasette_pytables/__init__.py
index 5e37c45d451c21bd8711baafa4ace4c9380af5bb..3c71267e9f1144cff2d2c02c32c74264bc223a7d 100644
(file)
--- 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__()