Re: Negative array indicies and slice()

Discussion in 'Python' started by Ethan Furman, Nov 1, 2012.

  1. Ethan Furman

    Ethan Furman Guest

    Chris Angelico wrote:
    > On Fri, Nov 2, 2012 at 1:12 AM, Ethan Furman <> wrote:
    >> In other words, the slice contains the strings, and my code calculates
    >> the offsets -- Python doesn't do it for me.

    >
    > That's correct, but you're still translating those strings into
    > numeric indices.


    True, but the point is that the /slice/ contains a data type that is
    neither a number, nor directly translatable into a number (that is, no
    __index__ method), and my code would cease to function should that
    change to slices be made.

    ~Ethan~
    Ethan Furman, Nov 1, 2012
    #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. Replies:
    72
    Views:
    740
    88888 Dihedral
    Nov 2, 2012
  2. Andrew Robinson

    Re: Negative array indicies and slice()

    Andrew Robinson, Oct 29, 2012, in forum: Python
    Replies:
    0
    Views:
    117
    Andrew Robinson
    Oct 29, 2012
  3. Mark Lawrence

    Re: Negative array indicies and slice()

    Mark Lawrence, Oct 29, 2012, in forum: Python
    Replies:
    0
    Views:
    150
    Mark Lawrence
    Oct 29, 2012
  4. Ethan Furman

    Re: Negative array indicies and slice()

    Ethan Furman, Oct 30, 2012, in forum: Python
    Replies:
    0
    Views:
    147
    Ethan Furman
    Oct 30, 2012
  5. Dennis Lee Bieber

    Re: Negative array indicies and slice()

    Dennis Lee Bieber, Oct 31, 2012, in forum: Python
    Replies:
    0
    Views:
    141
    Dennis Lee Bieber
    Oct 31, 2012
Loading...

Share This Page