Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > memoryview (was "len() on mutables vs. immutables")

Reply
Thread Tools

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

 
 
Demian Brecht
Guest
Posts: n/a
 
      02-08-2013
On 2013-02-07 8:30 PM, "Terry Reedy" <(E-Mail Removed)> 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?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: memoryview (was "len() on mutables vs. immutables") Demian Brecht Python 0 02-08-2013 03:52 PM
Re: memoryview (was "len() on mutables vs. immutables") Oscar Benjamin Python 0 02-08-2013 02:50 PM
Re: len() on mutables vs. immutables Terry Reedy Python 0 10-18-2012 06:29 PM
len() on mutables vs. immutables Demian Brecht Python 0 10-18-2012 05:23 PM
attach cString to memoryview? Phlip Python 1 08-03-2011 01:41 PM



Advertisments