[New-bugs-announce] [issue7203] fixer for map(None, ...) needs to consider multi-argument case

Georg Brandl report at bugs.python.org
Sun Oct 25 18:53:26 CET 2009


New submission from Georg Brandl <georg at python.org>:

Currently, ``map(None, a)`` is recognized and converted to ``list(a)``
which is correct but quite useless.

``map(None, a, b, ...)`` is not treated specially.  An approximate
translation would be ``map(lambda *xs: xs, a, b, ...)`` which however
doesn't take into account that the new map cuts after the shortest
sequence instead of "filling up" the shorter ones with Nones.

That should probably produce a warning.

----------
components: 2to3 (2.x to 3.0 conversion tool)
messages: 94455
nosy: georg.brandl
priority: high
severity: normal
stage: needs patch
status: open
title: fixer for map(None, ...) needs to consider multi-argument case
type: behavior
versions: Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7203>
_______________________________________


More information about the New-bugs-announce mailing list