Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8463
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <enalicho@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.06; 'python': 0.08; 'subject:error': 0.11; 'syntax': 0.11; 'wrote:': 0.15; '+def': 0.16; '-def': 0.16; 'build.': 0.16; 'fix,': 0.16; 'fix:': 0.16; 'subject:syntax': 0.16; 'suggestions?': 0.16; '\xa0def': 0.16; 'skip:" 40': 0.16; 'cc:addr:python-list': 0.16; 'pm,': 0.16; 'def': 0.16; 'suggest': 0.17; 'errors,': 0.19; 'received:74.125.82.174': 0.19; 'received:mail- wy0-f174.google.com': 0.19; '(which': 0.20; "haven't": 0.21; 'subject:question': 0.21; '(most': 0.21; 'cc:2**0': 0.21; 'file,': 0.22; 'tells': 0.22; 'maybe': 0.22; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'invalid': 0.25; 'traceback': 0.25; 'later': 0.26; 'tried': 0.27; "i'm": 0.27; 'pass': 0.28; 'seeing': 0.28; 'message-id:@mail.gmail.com': 0.28; 'import': 0.29; 'cc:addr:python.org': 0.30; 'sun,': 0.30; 'change.': 0.32; 'error': 0.33; "i've": 0.33; 'it.': 0.33; 'does': 0.33; 'anyone': 0.33; 'regardless': 0.34; "can't": 0.34; 'identical': 0.35; 'last):': 0.35; 'occurs': 0.35; 'skip:" 10': 0.36; 'explain': 0.36; 'before.': 0.37; 'anything': 0.37; 'received:google.com': 0.37; 'but': 0.37; 'some': 0.37; 'install': 0.38; 'showing': 0.38; 'steven': 0.38; 'subject:: ': 0.38; 'two': 0.38; 'run': 0.39; 'went': 0.39; 'received:74.125.82': 0.39; "there's": 0.39; 'received:74.125': 0.40; 'did': 0.40; 'here.': 0.66; '26,': 0.67; 'jun': 0.67; 'setting,': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=e+GTrrOLbtlKsjWz1iN4lcOw4FX19/Dopf8fgVcVNjU=; b=RH8vj0PS6LZbdGlMojP1oEjRR17MVy57ctyk/fFgzqX5wOzf9UaNf3eNbUYKlTrJ9n ERwxeTEAWe9D8x9zKDnibi6kkn4nHy8Q7N+2oNfvSkcJiw0F3K/J0xcGHbW5hwzpXphK upyVMMZ5C1x/DW8vtR6xF91OUGuSZtmF2P+UI= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Dtu4DAJAbAxp9TAEftblH70iJ6j+6Z6TNogQ5hK9pU8BE54i17GUac8WfmXTCa2c75 IMC8xRdB7fNOGwTpcBI8t8sQ8Dpg9cZ9o4DcNGdzrIP33zEN/BkcF0/4Z/HlhxEmR6ph 5GBqsC6PjjBAnF94goqUex0CZlM8lPYM7hX4Q= |
| MIME-Version | 1.0 |
| In-Reply-To | <Xns9F105B30356CArzantowgmailcom@74.209.131.13> |
| References | <Xns9F105B30356CArzantowgmailcom@74.209.131.13> |
| From | Noah Hall <enalicho@gmail.com> |
| Date | Sun, 26 Jun 2011 16:10:24 +0100 |
| Subject | Re: Python 3 syntax error question |
| To | rzed <rzantow@gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.416.1309101045.1164.python-list@python.org> (permalink) |
| Lines | 42 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1309101045 news.xs4all.nl 4371 [::ffff:82.94.164.166]:39124 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:8463 |
Show key headers only | View raw
On Sun, Jun 26, 2011 at 2:04 PM, rzed <rzantow@gmail.com> wrote:
> I've tried to install PySVG in a Python 3 setting, and I get a few
> errors on the build. Most are easy to fix, but this one I can't
> explain or fix:
>
> <error>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "builders.py", line 12, in <module>
> from pysvg.shape import *
> File "C:\Python32\lib\site-packages\pysvg\shape.py", line 91
> def moveToPoint(self,(x,y)):
> ^
> SyntaxError: invalid syntax
> </error>
>
> The moveToPoint method occurs three times in the file, with identical
> signatures. The other two are not showing up as errors, though since
> they occur later in the file, that may not be indicative.
>
> I don't see anything erroneous in this line. The syntax error often
> comes from the previous line, but I've moved this method around and
> it has always failed on this line and no other, regardless of what
> went before.
>
> I'm new to Py3, so maybe there's some obvious thing I'm not seeing
> here. Does anyone have any suggestions?
Did you run it through 2to3? When I run
def a(b, (c,d)):
pass
through 2to3, it tells me what I need to change.
-def a(b, (c,d)):
+def a(b, xxx_todo_changeme):
+ (c,d) = xxx_todo_changeme
(which is what Steven said)
If you haven't used 2to3, I suggest you use it.
HTH.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Python 3 syntax error question rzed <rzantow@gmail.com> - 2011-06-26 13:04 +0000
Re: Python 3 syntax error question steve+comp.lang.python@pearwood.info - 2011-06-27 00:51 +1000
Re: Python 3 syntax error question rzed <rzantow@gmail.com> - 2011-06-26 15:28 +0000
Re: Python 3 syntax error question Chris Angelico <rosuav@gmail.com> - 2011-06-27 01:31 +1000
Re: Python 3 syntax error question Noah Hall <enalicho@gmail.com> - 2011-06-26 16:32 +0100
Re: Python 3 syntax error question Jerry Hill <malaclypse2@gmail.com> - 2011-06-26 12:50 -0400
Re: Python 3 syntax error question Terry Reedy <tjreedy@udel.edu> - 2011-06-26 13:31 -0400
Re: Python 3 syntax error question Peter Otten <__peter__@web.de> - 2011-06-26 16:59 +0200
Re: Python 3 syntax error question Noah Hall <enalicho@gmail.com> - 2011-06-26 16:10 +0100
csiph-web