New submission from Robert Kern <robert.k...@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)
files: raw-array-long.diff
keywords: patch
messages: 132144
nosy: Robert.Kern
priority: normal
severity: normal
status: open
title: RawArray does not accept long
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file21396/raw-array-long.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11673>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to