Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #38416

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

Date 2013-02-07 22:24 -0800
Subject memoryview (was "len() on mutables vs. immutables")
From Demian Brecht <demianbrecht@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1483.1360304707.2939.python-list@python.org> (permalink)

Show all headers | View raw


On 2013-02-07 8:30 PM, "Terry Reedy" <tjreedy@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
figured I'd write something about my findings as I dug around the source
in order to answer the question for myself.

Still wondering about memoryview though:

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.. Or is there something
that I'm missing altogether?

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

memoryview (was "len() on mutables vs. immutables") Demian Brecht <demianbrecht@gmail.com> - 2013-02-07 22:24 -0800

csiph-web