This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients amaury.forgeotdarc, ncoghlan, pitrou, teoliphant
Date 2008-12-09.23:21:15
SpamBayes Score 9.600071e-11
Marked as misclassified No
Message-id <1228864873.25750.4.camel@localhost>
In-reply-to <1228857156.04.0.779219437567.issue4580@psf.upfronthosting.co.za>
Content
Hi Nick,

> 1. memoryview needs to be fixed so that internally self->view.len is
> always the length in bytes, even after taking a slice of the view

This is in my patch, unless I'm missing something?

> 2. memoryview needs to be fixed so that len() reflects the number of
> items in the view (i.e. self->view.shape[0]), not the total number of bytes

Why should that be? There's nothing suggesting that in the PEP. On the
other hand I agree it looks a bit higher-level.

> 3. array.array needs to be fixed so that it populates the shape array (a
> pointer to the arrays own internal length field should be adequate)

array.array is broken but that's a separate issue IMO (see e.g. #4509).
This issue is for fixing memoryview.

> 4. PyObject_GetBuffer needs to raise an exception if it sees ndim > 0
> with a NULL shape array in the resulting Py_buffer.

I'm for it, except that we must make sure that nobody really relies on
the current behaviour. I'm not sure there's only array.array.
History
Date User Action Args
2008-12-09 23:21:17pitrousetrecipients: + pitrou, teoliphant, amaury.forgeotdarc, ncoghlan
2008-12-09 23:21:16pitroulinkissue4580 messages
2008-12-09 23:21:15pitroucreate