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: 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: References: From: Noah Hall Date: Sun, 26 Jun 2011 16:10:24 +0100 Subject: Re: Python 3 syntax error question To: rzed 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Sun, Jun 26, 2011 at 2:04 PM, rzed 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: > > > Traceback (most recent call last): > =A0File "", line 1, in > =A0File "builders.py", line 12, in > =A0 =A0from pysvg.shape import * > =A0File "C:\Python32\lib\site-packages\pysvg\shape.py", line 91 > =A0 =A0def moveToPoint(self,(x,y)): > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^ > SyntaxError: invalid syntax > > > 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) =3D xxx_todo_changeme (which is what Steven said) If you haven't used 2to3, I suggest you use it. HTH.