True
True
an integer is required
-Expected tuple, got int
+Expected type, got int
"""
def import1():
def typed_imports():
import sys
+ import types
cdef long maxunicode
- cdef tuple t
+ cdef type t
from sys import maxunicode
print maxunicode == sys.maxunicode
- from sys import version_info as t
- print t is sys.version_info
-
+ from types import ModuleType as t
+ print t is types.ModuleType
+
try:
from sys import version_info as maxunicode
except TypeError, e:
>>> test_long_long()
"""
+import sys
+if sys.version_info[0] >= 3:
+ __doc__ = __doc__.replace(u'is unsubscriptable', u'is not subscriptable')
+
def index_tuple(tuple t, int i):
return t[i]
-"""
+__doc__ = u"""
>>> f()
42.0
42.0
Traceback (most recent call last):
...
SystemError: bad memberdescr type
-
"""
+import sys
+if sys.version_info[0] >= 3:
+ __doc__ = __doc__.replace(u'TypeError:', u'AttributeError:')
+
+
cdef extern from "external_defs.h":
ctypedef float DoubleTypedef
ctypedef float LongDoubleTypedef