[New-bugs-announce] [issue11673] RawArray does not accept long
report at bugs.python.org
Fri Mar 25 20:47:14 CET 2011
New submission from Robert Kern <robert.kern at gmail.com>:
The constructor for multiprocessing.RawArray() takes an argument that is either an integer size or a sequence to initialize the contents. To determine if the argument is a size, it uses isinstance(x, int). This means that integers that happen to be Python longs cause an error. On Win64 systems, Python ints are still 32-bits, so valid sizes for arrays sometimes must be represented by Python longs.
Attached is a patch that uses operator.index() to determine if the object can be used as an integer size.
components: Library (Lib)
title: RawArray does not accept long
versions: Python 2.7
Added file: http://bugs.python.org/file21396/raw-array-long.diff
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce