import Builtin
import Symtab
import Options
+from Cython import Utils
from Annotate import AnnotationItem
from Cython.Debugging import print_call_chain
self.type = PyrexTypes.error_type
return
+ if isinstance(self.index, IntNode) and Utils.long_literal(self.index.value):
+ self.index = self.index.coerce_to_pyobject(env)
+
# Handle the case where base is a literal char* (and we expect a string, not an int)
if isinstance(self.base, BytesNode):
self.base = self.base.coerce_to_pyobject(env)
def large_literal_index(object o):
"""
- >>> large_literal_index({1000000000000000000000000000000: "yes"})
+ >>> large_literal_index({1000000000000000000000000000000: True})
+ True
"""
return o[1000000000000000000000000000000]