Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.040 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'subject: ?': 0.05; 'interpreter': 0.07; "subject:' ": 0.07; 'subject:Python': 0.07; 'to:addr:comp.lang.python': 0.09; 'python': 0.11; 'print': 0.15; 'cc:addr:python-list': 0.15; 'dig': 0.16; 'executed': 0.16; 'executes': 0.16; 'subject:between': 0.16; 'output': 0.18; 'resulting': 0.18; 'wrote:': 0.21; 'processor': 0.22; 'produces': 0.22; 'statement': 0.22; 'header:In-Reply-To:1': 0.22; 'header :User-Agent:1': 0.23; 'possibly': 0.23; 'syntax': 0.23; 'input': 0.24; 'error': 0.25; 'cc:addr:python.org': 0.27; '(by': 0.29; 'code': 0.29; 'file': 0.29; 'asking': 0.29; 'machine': 0.29; 'character': 0.30; 'points': 0.30; 'source': 0.31; 'received:209.85': 0.32; 'received:google.com': 0.32; 'produced': 0.32; 'byte': 0.33; 'cc:2**2': 0.33; 'could': 0.34; 'received:209': 0.35; 'two': 0.35; 'there': 0.35; 'version': 0.36; 'really': 0.36; 'something': 0.38; 'think': 0.40; 'skip:n 10': 0.62; 'between': 0.64; 'inside': 0.65; 'different': 0.65; 'temporary': 0.66; 'times': 0.66; 'from:no real name:2**0': 0.67; 'from:addr:163.com': 0.70; "'3'": 0.84; 'davea': 0.84; 'skip:2 50': 0.84; 'subject:there': 0.84; 'power': 0.87; 'cc:no real name:2**2': 0.91; 'same,': 0.91; 'hand,': 0.96; 'email addr:163.com': 0.97 Newsgroups: comp.lang.python Date: Mon, 26 Mar 2012 07:28:25 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=65.49.68.171; posting-account=Z1-aQQoAAADvnuKxr9sysEiuPIcBNfjX References: <5128580.32.1332762326119.JavaMail.geo-discussion-forums@pbom7> User-Agent: G2/1.0 X-Google-Web-Client: true MIME-Version: 1.0 Subject: Re: Is there any difference between print 3 and print '3' in Python ? From: redstone-cold@163.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org, d@davea.name, redstone-cold@163.com 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: , Message-ID: Lines: 70 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1332772679 news.xs4all.nl 6957 [2001:888:2000:d::a6]:47092 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:22192 =E5=9C=A8 2012=E5=B9=B43=E6=9C=8826=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=80UTC+= 8=E4=B8=8B=E5=8D=888=E6=97=B611=E5=88=8603=E7=A7=92=EF=BC=8CDave Angel=E5= =86=99=E9=81=93=EF=BC=9A > On 03/26/2012 07:45 AM, redstone-cold@163.com wrote: > > I know the print statement produces the same result when both of these = two instructions are executed ,I just want to know Is there any difference = between print 3 and print '3' in Python ? >=20 > This is a non-question. The input is the same, the output is the same,= =20 > what else matters? >=20 > On the other hand, if you want to dig deeper, there are lots of differenc= es: >=20 > 1) the former has a shorter source file > 2) different C code is utilized inside the interpreter > 3) different machine code executes > 4) the temporary objects created have different id's and types > 5) different execution times (by a trivial amount) > 6) it takes different keystrokes to edit the two source files once you=20 > want to make it do something useful > 7) the processor works a little harder on one than the other, possibly=20 > resulting in a different power consumption > 8) different byte code is produced >=20 > Or you could be asking about Python version 3, in which case > 1) the syntax error message points to a different character >=20 > --=20 >=20 > DaveA =E5=9C=A8 2012=E5=B9=B43=E6=9C=8826=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=80UTC+= 8=E4=B8=8B=E5=8D=888=E6=97=B611=E5=88=8603=E7=A7=92=EF=BC=8CDave Angel=E5= =86=99=E9=81=93=EF=BC=9A > On 03/26/2012 07:45 AM, redstone-cold@163.com wrote: > > I know the print statement produces the same result when both of these = two instructions are executed ,I just want to know Is there any difference = between print 3 and print '3' in Python ? >=20 > This is a non-question. The input is the same, the output is the same,= =20 > what else matters? >=20 > On the other hand, if you want to dig deeper, there are lots of differenc= es: >=20 > 1) the former has a shorter source file > 2) different C code is utilized inside the interpreter > 3) different machine code executes > 4) the temporary objects created have different id's and types > 5) different execution times (by a trivial amount) > 6) it takes different keystrokes to edit the two source files once you=20 > want to make it do something useful > 7) the processor works a little harder on one than the other, possibly=20 > resulting in a different power consumption > 8) different byte code is produced >=20 > Or you could be asking about Python version 3, in which case > 1) the syntax error message points to a different character >=20 > --=20 >=20 > DaveA Oh ,God ! I think this is what I really want to know ,thank you very much = !