mark bytearray() and complex() as returning an instance of their type
authorStefan Behnel <stefan_ml@behnel.de>
Fri, 30 Aug 2013 07:13:42 +0000 (09:13 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Fri, 30 Aug 2013 07:13:42 +0000 (09:13 +0200)
Cython/Compiler/Builtin.py

index 2139db8..77826b9 100644 (file)
@@ -337,8 +337,9 @@ builtin_types_table = [
 types_that_construct_their_instance = set([
     # some builtin types do not always return an instance of
     # themselves - these do:
-    'type', 'bool', 'long', 'float', 'bytes', 'unicode', 'tuple', 'list',
-    'dict', 'set', 'frozenset'
+    'type', 'bool', 'long', 'float', 'complex',
+    'bytes', 'unicode', 'bytearray',
+    'tuple', 'list', 'dict', 'set', 'frozenset'
     # 'str',             # only in Py3.x
     # 'file',            # only in Py2.x
 ])