Help with changes in traceback stack from Python 2.7 to Python 3.x

Ian Kelly ian.g.kelly at gmail.com
Sat Apr 26 11:13:52 EDT 2014


On Apr 26, 2014 8:12 AM, "Ned Batchelder" <ned at nedbatchelder.com> wrote:
> Looking at your code, I see:
>
>
>     tplArgs = map(None, lstVarNames, args)
>
> I didn't realize map accepted a callable of None (TIL!), but it no longer
does in Python 3.  You'll have to do this a different way.

The Python 3 replacement for map(None, ...) is itertools.zip_longest.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140426/08d0f7c7/attachment.html>


More information about the Python-list mailing list