This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | belopolsky |
|---|---|
| Recipients | belopolsky, christian.heimes, collinwinter, jackdied, josiahcarlson, phr, rhettinger, twobitsprite |
| Date | 2008年02月26日.13:45:20 |
| SpamBayes Score | 0.043106675 |
| Marked as misclassified | No |
| Message-id | <1204033522.18.0.0615723699208.issue1673203@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Raymond Hettinger wrote in msg63027 (issue2186): """ .. it looks like there [is an] agreement on dropping None for map() and going forward with the operator.identity() patch. Will check these in in the next couple of days. """ This leaves open the issue of multi-argument identity. I would argue that def identity(*args): return args[-1] # or args[0] will conflict with the use of identity instead of None in map: map(identity, x, y, ..) will silently produce results different from current map(None, x, y, ..). It is possible to make identity behave exactly like None in map by defining it as def identity(*args): if len(args) == 1: return args[0] else: return args While there is certain cuteness in making identity(...) equivalent to (...), it is a bit too cute for my taste. I am -1 on multi-argument identity. Also placement of identity in operator while map is in builtin, may complicate implementation of passthrough map optimization. While it is possible to avoid importing operator in builtin by implementing identity in builtin but exporting it only from operator, a more straightforward solution would be to keep map and identity in the same module. This logic may be a slippery slope, however, because optimizing filterfalse, would suggest that operator.not_ should be moved in the same module as the ultimate location for filterfalse. I am +1 on implementing optimization for map(identity, ..), +0 on that for filterfalse(not_, ..), 0 on the location of identity. (BTW, maybe we should implement optimization for filter(not_, ..) and drop filterfalse altogether.) |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年02月26日 13:45:22 | belopolsky | set | spambayes_score: 0.0431067 -> 0.043106675 recipients: + belopolsky, collinwinter, rhettinger, phr, josiahcarlson, jackdied, christian.heimes, twobitsprite |
| 2008年02月26日 13:45:22 | belopolsky | set | spambayes_score: 0.0431067 -> 0.0431067 messageid: <1204033522.18.0.0615723699208.issue1673203@psf.upfronthosting.co.za> |
| 2008年02月26日 13:45:21 | belopolsky | link | issue1673203 messages |
| 2008年02月26日 13:45:20 | belopolsky | create | |