Nick Coghlan <[EMAIL PROTECTED]> added the comment: Note that this functionality is currently available as follows:
>>> from itertools import count >>> list(zip(count(3), 'abcdefg') [(3, 'a'), (4, 'b'), (5, 'c'), (6, 'd'), (7, 'e'), (8, 'f'), (9, 'g')] The enumerate(itr) builtin is just a convenience to avoid a module import for the most basic zip(count(), itr) version. The proposed patch would enable the example above to be written more verbosely as: >>> list(enumerate('abcdefg', start=3)) Or, with the positional argument approach as: >>> list(enumerate(3, 'abcdefg')) So, more verbose than the existing approach, and ambiguous to boot - as Raymond noted, with the first it really isn't clear whether the first value returned would be (3, 'd') or (3, 'a'), and with the second form it isn't clear whether we're skipping the first three items, or returning only those items. Let's keep the builtins simple, and let itertools handle the variants - that's why the module exists. ---------- nosy: +ncoghlan __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2831> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com