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

2013-02-08 Thread Oscar Benjamin
On 8 February 2013 06:24, Demian Brecht demianbre...@gmail.com wrote: On 2013-02-07 8:30 PM, Terry Reedy tjre...@udel.edu 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

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 oscar.j.benja...@gmail.com wrote: This is in keeping with the way that

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

2013-02-07 Thread Demian Brecht
On 2013-02-07 8:30 PM, Terry Reedy tjre...@udel.edu 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