Patches item #1739906, was opened at 2007-06-19 21:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1739906&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: Library (Lib)
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Christian Heimes (tiran)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add reduce to functools in 2.6

Initial Comment:
I'm proposing to add reduce to functools to make code forward compatible with 
3.0 code. Since 2to3 has no fixer for reduce it's an easy way to make code run 
under 2.6 and 3.0 w/o a try/except ImportError block.

Index: Lib/functools.py
===================================================================
--- Lib/functools.py    (revision 56041)
+++ Lib/functools.py    (working copy)
@@ -8,6 +8,7 @@
 # See C source code for _functools credits/copyright
 
 from _functools import partial
+from __builtin__ import reduce
 
 # update_wrapper() and wraps() are tools to help write
 # wrapper functions that can handle naive introspection


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1739906&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to