GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [Python-Dev] Adding start to enumerate()
  • [Python-Dev] Adding start to enumerate()
  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] Adding start to enumerate()

[Python-Dev] Adding start to enumerate()

Brett Cannon brett at python.org
Mon May 12 03:35:45 CEST 2008

  • Previous message: [Python-Dev] Adding start to enumerate()
  • Next message: [Python-Dev] Adding start to enumerate()
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

On Sun, May 11, 2008 at 6:23 PM, Scott Dial
<scott+python-dev at scottdial.com> wrote:
> Brett Cannon wrote:
>>
>> Taking a new argument that has a default shouldn't be an issue. +1
>> from me. I assume it is just going to start the count at that number,
>> not advance the iterable to that point, right?
>
> I wonder if it would be best for it to be a keyword-only argument. So
> many of the utility functions on iterables are foo(*iterables) that I
> might be inclined to think enumerate(foo, bar) is equivalent to
> enumerate(chain(foo, bar)), but enumerate(foo, start=bar) is pretty
> obvious. And if you consider that the enumeration is prepended to the
> values of foo, enumerate(foo, bar) is "backwards." Just saying..
>

Sure, making it 'start' or something and having it be keyword-only makes sense.

-Brett

  • Previous message: [Python-Dev] Adding start to enumerate()
  • Next message: [Python-Dev] Adding start to enumerate()
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the Python-Dev mailing list
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.