Issue1513249
Created on 2006-06-27 10:20 by collinwinter, last changed 2008-01-06 22:29 by admin.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
py3k-remove_reduce.patch
|
collinwinter,
2006-06-27 10:20
|
Remove reduce(), against r47103 |
|
|
|
msg50535 - (view) |
Author: Collin Winter (collinwinter) |
Date: 2006-06-27 10:20 |
|
This patch removes the built-in reduce() function,
including its documentation and tests.
This patch is against r47103.
|
|
msg50536 - (view) |
Author: Jim Jewett (jimjjewett) |
Date: 2006-06-27 15:19 |
|
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?
|
|
msg50537 - (view) |
Author: Collin Winter (collinwinter) |
Date: 2006-06-27 15:20 |
|
Logged In: YES
user_id=1344176
Would you like to see map, filter, reduce all moved to
functools?
|
|
msg50538 - (view) |
Author: Jim Jewett (jimjjewett) |
Date: 2006-06-27 15:24 |
|
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())
|
|
msg50539 - (view) |
Author: Collin Winter (collinwinter) |
Date: 2006-06-27 15:42 |
|
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.
|
|
msg50540 - (view) |
Author: Brett Cannon (brett.cannon) |
Date: 2006-06-27 15:51 |
|
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.
|
|
msg50541 - (view) |
Author: Collin Winter (collinwinter) |
Date: 2006-06-28 09:43 |
|
Logged In: YES
user_id=1344176
This patch has been superseded by path #1513870.
|
|
| Date |
User |
Action |
Args |
| 2008-01-06 22:29:46 | admin | set | keywords:
- py3k versions:
+ Python 3.0 |
| 2006-06-27 10:20:25 | collinwinter | create | |
|