[pypy-issue] [issue808] Pypy throws exception when typecasting array whereas CPython doesn't

Connelly Barnes tracker at bugs.pypy.org
Mon Jul 25 20:56:20 CEST 2011

Connelly Barnes <connellybarnes at gmail.com> added the comment:

Note that both CPython and Pypy raise an error when extending a float array with 
an integer array. So apparently Pypy's behavior in extend() is correct... 
Although this seems somewhat inconsistent of CPython.

Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
>>> a=array.array('f',[1,2,3])
>>> b=array.array('i',[4,5,6])
>>> a.extend(b)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can only extend with array of same kind

status: unread -> chatting

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list