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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.06; 'see:': 0.07; 'args)': 0.09; 'subject:2.7': 0.09; 'subject:Help': 0.11; 'python': 0.11; 'callable': 0.16; 'wrote:': 0.18; 'code,': 0.22; '&gt;': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'subject:from': 0.34; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; "didn't": 0.36; 'to:addr:python-list': 0.38; 'does': 0.39; 'realize': 0.39; 'to:addr:python.org': 0.39; "you'll": 0.62; 'map': 0.64; 'different': 0.65; '26,': 0.68
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=6IFXFXDFXIAG0pZcj6gZCLriSFYrCS9hGvod1A5LiWA=; b=NYOySFLQ7Ng8jovP22NISyumqBV+OK6jPYq4EysivwI6ySueU7h8HbR4AYfZ+DwN8+ sFd14+gNGzBtpF7Cx/x0hDbBK1lesSJkbFVdsmtv/XwPvGKStcq1gZV4iMo1OLlljZ5J h1Ys1y5o54ADdGjRJf5+a4TOF+aKAJQfv2ElqnupmVgzuKvoUGrW5VL+pWw0gJvK3q4c r+FQ0wM29mFEFAeJgzI3TKctvp93+3R9q5GY+3q3CTGToNIGE3YIsepaLCxhrxdhs6DT HN06SApoGm0YJmGVUkv28pCETW+dyacm+LdY6PTTAqbnt3p6+hGJDR5urudOdFRqDXFP l8mg==
MIME-Version 1.0
X-Received by 10.68.170.66 with SMTP id ak2mr18298202pbc.5.1398525232465; Sat, 26 Apr 2014 08:13:52 -0700 (PDT)
In-Reply-To <ljg7nn$3gn$1@ger.gmane.org>
References <9fb27984-1b9e-402b-aa4d-7ca4f26e2386@me.com> <ljg7nn$3gn$1@ger.gmane.org>
Date Sat, 26 Apr 2014 11:13:52 -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>
To Python <python-list@python.org>
Content-Type multipart/alternative; boundary=047d7b86d55cb0cf0904f7f38792
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.9519.1398525241.18130.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1398525241 news.xs4all.nl 2877 [2001:888:2000:d::a6]:47568
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:70633

Show key headers only | 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