Raise error en slice
This commit is contained in:
@@ -8,7 +8,7 @@ PYTHON3 = True
|
|||||||
if sys.version_info[0] < 3:
|
if sys.version_info[0] < 3:
|
||||||
PYTHON3 = False
|
PYTHON3 = False
|
||||||
|
|
||||||
VERSION = "0.0.14"
|
VERSION = "0.0.15"
|
||||||
|
|
||||||
|
|
||||||
def is_map(obj):
|
def is_map(obj):
|
||||||
@@ -308,6 +308,9 @@ class SQLQuery(object):
|
|||||||
return clone
|
return clone
|
||||||
|
|
||||||
def __getitem__(self, slice):
|
def __getitem__(self, slice):
|
||||||
|
if isinstance(slice, str):
|
||||||
|
raise IndexError
|
||||||
|
|
||||||
clone = self._clone()
|
clone = self._clone()
|
||||||
clone._limits = slice
|
clone._limits = slice
|
||||||
return clone
|
return clone
|
||||||
|
|||||||
Reference in New Issue
Block a user