[Numpy-discussion] Strange behavior of operator *=

Charles R Harris charlesr.harris at gmail.com
Tue Apr 5 12:01:42 EDT 2011

On Tue, Apr 5, 2011 at 8:44 AM, Alan G Isaac <alan.isaac at gmail.com> wrote:

> On 4/5/2011 10:37 AM, Nathaniel Smith wrote:
> > Yes, this is a fact about Python 'int', not a fact about numpy -- a
> > Python 'int' is defined to hold a C 'long', which will be either 32 or
> > 64 bits depending on platform.
> So what is the rule for Python 3, where iiuc it can no longer be "a fact
> about Python"?
At the c-api level I believe we still use the routines that convert python
ints to longs. If we drop support for python < 2.6 we could change to using
Py_ssize_t instead since there are python functions for that and we might
get larger ints on 64 bit windows since windows longs are always 32 bits.
That might also be compiler dependent however...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110405/ac80d121/attachment.html>

More information about the NumPy-Discussion mailing list