From: Stefan Behnel Date: Fri, 30 Aug 2013 07:13:42 +0000 (+0200) Subject: mark bytearray() and complex() as returning an instance of their type X-Git-Tag: 0.20b1~352 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c77a09a07487480e19688aa2c53c3a0a3e5dc08a;p=platform%2Fupstream%2Fpython-cython.git mark bytearray() and complex() as returning an instance of their type --- diff --git a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py index 2139db8..77826b9 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 ])