Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70633

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

References <9fb27984-1b9e-402b-aa4d-7ca4f26e2386@me.com> <ljg7nn$3gn$1@ger.gmane.org>
Date 2014-04-26 11:13 -0400
Subject Re: Help with changes in traceback stack from Python 2.7 to Python 3.x
From Ian Kelly <ian.g.kelly@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.9519.1398525241.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Apr 26, 2014 8:12 AM, "Ned Batchelder" <ned@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.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-26 11:13 -0400

csiph-web