Re: memoryview (was "len() on mutables vs. immutables")

2013-02-08 Thread Demian Brecht
This helped clarify, thanks. I also went through PEP 3118 in detail (as I should have in the first place) which also helped. Thanks, Demian Brecht http://demianbrecht.github.com On 2013-02-08 6:50 AM, "Oscar Benjamin" wrote: >This is in keeping with the way that numpy.ndarrays work. Essential

Re: memoryview (was "len() on mutables vs. immutables")

2013-02-08 Thread Oscar Benjamin
On 8 February 2013 06:24, Demian Brecht wrote: > On 2013-02-07 8:30 PM, "Terry Reedy" wrote: > > If a memoryview (3+) is representing a non-continuguous block of memory (> > 1 > ndim), will len(obj) not return incorrect results? It seems to be > reporting the shape of the 0th dim at the moment..

memoryview (was "len() on mutables vs. immutables")

2013-02-07 Thread Demian Brecht
On 2013-02-07 8:30 PM, "Terry Reedy" wrote: >So you may assume I've been bitten far too many times by incorrect assumptions about implementations that ended up actually doing something quite silly. Having said that, I felt fairly safe in making that assumption with Python, but figured I'd write s