[Patches] [ python-Patches-1498370 ] Improve itertools.starmap

SourceForge.net noreply at sourceforge.net
Fri Jun 9 22:13:24 CEST 2006


Patches item #1498370, was opened at 2006-05-31 13:41
Message generated for change (Comment added) made by jackdied
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1498370&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Modules
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Collin Winter (collinwinter)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Improve itertools.starmap

Initial Comment:
As it currently stands, the iterator argument to
itertools.starmap() must yield tuples, even those any
iterable can be *-expanded in function calls. The
attached patch changes starmap()'s behaviour (as well
as docs and tests) to allow the provided iterator to
return any iterable object.

The patch is against r46582.

----------------------------------------------------------------------

Comment By: Jack Diederich (jackdied)
Date: 2006-06-09 16:13

Message:
Logged In: YES 
user_id=591932

The patch can be simplified by always calling
PySequence_Tuple() and doing the decref instead of special
casing tuples.  If you pass PySequence_Tuple() a tuple it
will  incref it and hand it back to you.


----------------------------------------------------------------------

Comment By: George Yoshida (quiver)
Date: 2006-05-31 21:36

Message:
Logged In: YES 
user_id=671362




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1498370&group_id=5470


More information about the Patches mailing list