Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '2.x': 0.05; '3.2': 0.05; 'python': 0.08; '3.x': 0.09; '__future__': 0.09; 'deliberately': 0.09; 'incompatible': 0.09; 'oh,': 0.09; 'utility,': 0.09; 'yet)': 0.09; 'am,': 0.14; 'wrote:': 0.14; '(class': 0.16; '*any*': 0.16; '2to3': 0.16; 'angelico': 0.16; 'decorations,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'it...': 0.16; 'argument': 0.16; 'compatible': 0.16; "wouldn't": 0.17; "hasn't": 0.19; 'header:In-Reply-To:1': 0.21; 'enhancements': 0.23; 'received:209.85.210.174': 0.23; 'received :mail-iy0-f174.google.com': 0.23; 'versions': 0.23; "what's": 0.23; 'code': 0.24; '(and': 0.25; 'compare': 0.26; 'correct': 0.28; 'message-id:@mail.gmail.com': 0.28; 'beyond': 0.28; 'sat,': 0.29; 'import': 0.29; 'version': 0.29; 'translator': 0.30; 'print': 0.31; 'does': 0.33; 'to:addr:python-list': 0.33; 'things': 0.33; 'chris': 0.34; '2.6': 0.35; 'function.': 0.35; 'probably': 0.36; 'none': 0.37; 'running': 0.37; 'received:google.com': 0.37; 'something': 0.37; 'received:209.85': 0.37; 'comparing': 0.37; 'run': 0.38; 'but': 0.38; 'data': 0.38; 'subject:: ': 0.38; 'some': 0.38; 'received:209': 0.39; 'correctly': 0.39; 'either': 0.39; 'to:addr:python.org': 0.39; 'really': 0.40; 'almost': 0.60; 'best': 0.60; 'your': 0.60; 'below': 0.61; 'prove': 0.68; 'care': 0.72; 'biggest': 0.73; 'verified': 0.73; '*will': 0.84; 'by,': 0.84; 'difficult,': 0.84; '\xa0but,': 0.84; '\xa0most': 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:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=ctlceIJhtXFNOpBXPzHCOXYK2qvUS/eErgw8uPYkCwU=; b=pX4fueUGO9qQT+HwGWggQluBNssFFfj1NS2ZqqDu5I5XXaj29MRuNZBcuACp8xXQbL EKwNnC7+y1qH13/xFg0+61K3848YRW9hjNPm//C0UppF3mAaShHF09NzqVr9TbBe/+UQ tXrhJleC8UmE+qVHLZPVH5g5DjAAkldHKMmeM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=uJN8doV6BDD/MWWI4/e5jbGitE8spiji83JGbhjJUJKUukwA+zaDSvVKk57ToQSW+g f44bLFF+Dlpsf1+aJgRnfGyWrUdQxL6bKhz4RJGPNYmffQ2+tsC3LFF7trHRpR0fZepN AoIlh6yLjUKyA/9rf676NJxK4i/w8Pv4mGKLY= MIME-Version: 1.0 In-Reply-To: References: <4DDC7938.5000900@gmail.com> <4ddfc8ae$0$29996$c3e8da3$5496439d@news.astraweb.com> Date: Sat, 28 May 2011 09:09:11 +1000 Subject: Re: Beginner needs advice From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 35 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306537755 news.xs4all.nl 49039 [::ffff:82.94.164.166]:46207 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6438 On Sat, May 28, 2011 at 6:40 AM, harrismh777 wrot= e: > Most 2.x code *will not* run correctly in 3.x/ =A0Most of the best > improvements and enhancements of 3.x will not back-port to below 2.7, and > almost none of them will back-port before 2.6 (class decorations, for > instance). What's with the "below 2.7"? If you're comparing 3.x and 2.x, wouldn't it be most plausible to compare 3.2 and 2.7? And, the biggest reason for 2.x code not running on 3.x is probably the print function. (Guess made without any data beyond my own personal corpus of Python 2 code.) That's something that can be corrected by, oh, I dunno, the 2to3 translator maybe? And the __future__ import makes 2.6+ work the same way as 3.x. > All of these things are for the better, I must add. =A0But, the point is = that > 3.x is completely incompatible with 2.x in real ways. =A0Arguing that thi= s is > *not true* because you are able to create a code block that just happens = 'to > work' in all versions (and that hasn't been verified yet) does not in *an= y* > way 'prove' that 3.x is a compatible dialect--- =A0far from it... its a > straw-man argument. You're correct that one code block does not prove the point. But your argument is just as flimsy. To say that "most" 2.x code is incompatible with 3.x is to deny the 2to3 utility, and you're ignoring the people who deliberately write code that can cross-execute on either version - which is really not that difficult, if you take some care and use __future__ directives. Chris Angelico