Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5034
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Am still leaning towards rejecting this one based on:
* paucity of use cases
* non-atomicity (it can be built-out of existing tools)
* minimizing the number of tools in the toolkit
* not convinced that padded tuple unpacking
Robert Lehmann lehman...@gmail.com added the comment:
When I started writing this patch this was actually what I intended. But
having ``fixlen(range(3), 2)`` return 0 1 2 struck me as odd. Renaming
the function to `pad` would help there indeed.
It depends on which use case is more common:
New submission from Robert Lehmann lehman...@gmail.com:
As raised recently on python-ideas [1]_, an itertools method fixing
iterators to a certain length might be handy (where fixing is either
cutting elements off or appending values).
I appended a patch implementing this feature in Python/C,
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: - rhettinger
nosy: +rhettinger
versions: +Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5034
___
Antoine Pitrou pit...@free.fr added the comment:
Return an iterator fixing *iterable*\ 's length to *length* by either
cutting elements off or adding *value* to the iterable.
Rather than mixing both, it would be more flexible to have a separate
function for each IMO.
Cutting off is already be
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Am taking this under advisement but am initially disinclined. It is not
a basic itertool since it can be composed from the others. Also, it's
use cases seem to be few. One challenge for the module is that adding
more tools