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

Discussion in 'Python' started by Demian Brecht, Feb 8, 2013.

  1. 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 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?
     
    Demian Brecht, Feb 8, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Demian Brecht

    len() on mutables vs. immutables

    Demian Brecht, Oct 18, 2012, in forum: Python
    Replies:
    0
    Views:
    115
    Demian Brecht
    Oct 18, 2012
  2. Terry Reedy

    Re: len() on mutables vs. immutables

    Terry Reedy, Oct 18, 2012, in forum: Python
    Replies:
    0
    Views:
    118
    Terry Reedy
    Oct 18, 2012
  3. Demian Brecht

    Re: len() on mutables vs. immutables

    Demian Brecht, Oct 18, 2012, in forum: Python
    Replies:
    0
    Views:
    133
    Demian Brecht
    Oct 18, 2012
  4. Oscar Benjamin
    Replies:
    0
    Views:
    102
    Oscar Benjamin
    Feb 8, 2013
  5. Demian Brecht
    Replies:
    0
    Views:
    93
    Demian Brecht
    Feb 8, 2013
Loading...

Share This Page