Message77470
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. |
|
Date |
User |
Action |
Args |
2008-12-09 23:21:17 | pitrou | set | recipients:
+ pitrou, teoliphant, amaury.forgeotdarc, ncoghlan |
2008-12-09 23:21:16 | pitrou | link | issue4580 messages |
2008-12-09 23:21:15 | pitrou | create | |
|