[Patches] [ python-Patches-1513249 ] Remove reduce()
SourceForge.net
noreply at sourceforge.net
Wed Jun 28 11:43:15 CEST 2006
Patches item #1513249, was opened at 2006-06-27 06:20
Message generated for change (Comment added) made by collinwinter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1513249&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: Core (C code)
Group: Python 3000
Status: Closed
Resolution: Later
Priority: 5
Submitted By: Collin Winter (collinwinter)
Assigned to: Nobody/Anonymous (nobody)
Summary: Remove reduce()
Initial Comment:
This patch removes the built-in reduce() function,
including its documentation and tests.
This patch is against r47103.
----------------------------------------------------------------------
>Comment By: Collin Winter (collinwinter)
Date: 2006-06-28 05:43
Message:
Logged In: YES
user_id=1344176
This patch has been superseded by path #1513870.
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2006-06-27 11:51
Message:
Logged In: YES
user_id=357491
Just to answer your question about map and filter, Collin:
just rip them out. Generator comprehensions take care of
both cases. reduce() is the only thing worth moving to
functools.
----------------------------------------------------------------------
Comment By: Collin Winter (collinwinter)
Date: 2006-06-27 11:42
Message:
Logged In: YES
user_id=1344176
I've changed my local version to improve the difflib change,
per Jim's suggestion. I'm working on a combined patch that
will remove reduce, filter and map all in one go, so I'm
going to close this one.
----------------------------------------------------------------------
Comment By: Jim Jewett (jimjjewett)
Date: 2006-06-27 11:24
Message:
Logged In: YES
user_id=764593
If the difflib change, couldn't
+ matches = 0
+ for triple in self.get_matching_blocks():
+ matches += triple[-1]
be further simplified to
matches=sum(triple[-1] for triple in
self.get_matching_blocks())
----------------------------------------------------------------------
Comment By: Collin Winter (collinwinter)
Date: 2006-06-27 11:20
Message:
Logged In: YES
user_id=1344176
Would you like to see map, filter, reduce all moved to
functools?
----------------------------------------------------------------------
Comment By: Jim Jewett (jimjjewett)
Date: 2006-06-27 11:19
Message:
Logged In: YES
user_id=764593
This recreates a reduce in csv. Wouldn't it make more
sense to move reduce to functools, and import it from there?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1513249&group_id=5470
More information about the Patches
mailing list