cimport cython
+from cpython.bool cimport bool
cdef class A:
pass
# Optimized tests.
assert isinstance(new_type, type)
- assert isinstance(bool(), bool)
+ assert isinstance(True, bool)
assert isinstance(int(), int)
assert isinstance(long(), long)
assert isinstance(float(), float)
>>> test_optimised_tuple()
True
"""
- assert isinstance(bool(), (bool, int, long, float, bytes, str, unicode, tuple, list, dict, set, slice))
- assert isinstance(int(), (bool, int, long, float, bytes, str, unicode, tuple, list, dict, set, slice))
- assert isinstance(list(), (bool, int, long, float, bytes, str, unicode, tuple, list, dict, set, slice))
+ assert isinstance(int(), (int, long, float, bytes, str, unicode, tuple, list, dict, set, slice))
+ assert isinstance(list(), (int, long, float, bytes, str, unicode, tuple, list, dict, set, slice))
return True
@cython.test_assert_path_exists('//SimpleCallNode//SimpleCallNode')
cimport cython
from cython cimport typeof, infer_types
+from cpython cimport bool
+
##################################################
# type inference tests in 'full' mode
d = dict()
assert typeof(d) == "dict object", typeof(d)
B = bool()
- assert typeof(B) == "bool object", typeof(B)
+ assert typeof(B) == "bool", typeof(B)
def slicing():
"""