Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'python,': 0.02; 'operator': 0.03; 'interpreter': 0.04; "'python": 0.07; 'python': 0.09; "%s'": 0.09; 'handled.': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'subject:error': 0.11; 'subject:python': 0.11; 'charset:iso-8859-7': 0.15; 'evaluating': 0.16; 'expression,': 0.16; 'expression.': 0.16; 'expressions.': 0.16; 'footnote': 0.16; 'operator.': 0.16; 'subject:when': 0.16; 'wrote:': 0.17; 'code.': 0.20; 'do.': 0.21; 'parse': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'am,': 0.27; 'first,': 0.27; 'rules': 0.27; 'chris': 0.28; 'division': 0.29; 'second,': 0.29; 'fri,': 0.30; 'figure': 0.30; 'gets': 0.32; 'url:python': 0.32; 'generally': 0.32; 'languages': 0.33; 'version': 0.34; 'received:google.com': 0.34; 'wrong': 0.34; 'table': 0.35; 'received:209.85': 0.35; 'url:org': 0.36; 'useful': 0.36; 'should': 0.36; 'level': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'url:docs': 0.38; 'step': 0.39; 'your': 0.60; 'skip:u 10': 0.60; 'most': 0.61; 'high': 0.61; "you'll": 0.62; 'more': 0.63; 'percent': 0.65; 'walk': 0.71; 'gain': 0.79; '2013': 0.84; 'url:reference': 0.84; '\xcc\xe1\xf1\xf4\xdf\xef\xf5': 0.84; 'step.': 0.91 X-Received: by 10.49.24.194 with SMTP id w2mr3437726qef.42.1362670010642; Thu, 07 Mar 2013 07:26:50 -0800 (PST) Newsgroups: comp.lang.python Date: Thu, 7 Mar 2013 07:26:50 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.68.107.188; posting-account=DYJQ-woAAACEPH85Au2BhUVfFTfSfVa4 References: <8e17232e-5b24-4040-9215-c4bd89f34fa2@googlegroups.com> <622d4a2d-0014-4254-b211-c8fd66510f74@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 94.68.107.188 MIME-Version: 1.0 Subject: Re: An error when i switched from python v2.6.6 => v3.2.3 From: =?ISO-8859-7?B?zd/q7/Igw+rxMzPq?= To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 49 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362670757 news.xs4all.nl 6936 [2001:888:2000:d::a6]:43705 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40789 =D4=E7 =D0=DD=EC=F0=F4=E7, 7 =CC=E1=F1=F4=DF=EF=F5 2013 5:13:24 =EC.=EC. UT= C+2, =EF =F7=F1=DE=F3=F4=E7=F2 Chris Angelico =DD=E3=F1=E1=F8=E5: > On Fri, Mar 8, 2013 at 2:01 AM, =CD=DF=EA=EF=F2 =C3=EA=F133=EA wrote: >=20 > > os.system( 'python metrites.py > %s' ) % htmltemp >=20 >=20 >=20 > Manually step through what this line should do. Follow the exact same >=20 > rules Python will follow in evaluating this expression. >=20 >=20 >=20 > http://docs.python.org/2/reference/expressions.html#operator-precedence >=20 > http://docs.python.org/3/reference/expressions.html#operator-precedence >=20 >=20 >=20 > As you'll see from footnote 8 or 5 (depending on which version of the >=20 > docs), your percent operator is the same one listed in the table as a >=20 > division operator. >=20 >=20 >=20 > Now. Go through that expression, step by step. Walk through everything >=20 > the Python interpreter does. Figure out exactly what happens first, >=20 > second, third. Figure out when your percent operator gets handled. >=20 > Then you'll know what's wrong with that line of code. >=20 >=20 >=20 > You'll also gain a very useful understanding of Python, and more >=20 > generally of the way most high level languages parse expressions. >=20 >=20 >=20 > ChrisA I'am sorry to say i cant figure this out :( please enlight me.