From c77a09a07487480e19688aa2c53c3a0a3e5dc08a Mon Sep 17 00:00:00 2001
From: Stefan Behnel <stefan_ml@behnel.de>
Date: Fri, 30 Aug 2013 09:13:42 +0200
Subject: [PATCH] mark bytearray() and complex() as returning an instance of
 their type

---
 Cython/Compiler/Builtin.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
index 2139db86e..77826b945 100644
--- a/Cython/Compiler/Builtin.py
+++ b/Cython/Compiler/Builtin.py
@@ -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
 ])
-- 
2.30.9