Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'syntax': 0.03; 'output': 0.04; 'string.': 0.04; 'debug': 0.05; 'fixes': 0.05; 'extracted': 0.07; 'function,': 0.07; 'indexing': 0.07; 'only,': 0.07; 'pil': 0.07; 'rewrite': 0.07; 'semantic': 0.07; 'python': 0.09; '173': 0.09; '__future__': 0.09; 'accepts': 0.09; 'bytes,': 0.09; 'hooks': 0.09; 'integers': 0.09; 'pgp': 0.09; 'subject:Why': 0.09; 'subject:language': 0.09; 'subject:still': 0.09; 'tismer': 0.09; 'tuple': 0.09; 'unmodified': 0.09; 'cc:addr:python-list': 0.10; 'files.': 0.13; '+49': 0.15; 'properly': 0.15; '(which,': 0.16; '*starship*': 0.16; '0x57f3bf04': 0.16; '1619': 0.16; '3.2,': 0.16; '305b': 0.16; '57f3': 0.16; '5a3b': 0.16; '776': 0.16; '9064': 0.16; 'bf04': 0.16; 'break!': 0.16; 'c09c': 0.16; 'c2ff': 0.16; 'circumvent': 0.16; 'd754': 0.16; 'f4e1': 0.16; 'from:addr:stackless.com': 0.16; 'from:addr:tismer': 0.16; 'from:name:christian tismer': 0.16; 'hides': 0.16; 'message- id:@stackless.com': 0.16; 'received:stackless.com': 0.16; 'sake,': 0.16; 'sources.': 0.16; 'subject: \n ': 0.16; 'subject:created': 0.16; 'subject:python2.7': 0.16; 'subject:python3': 0.16; 'subject:seperate': 0.16; 'subject:where': 0.16; 'tismerysoft': 0.16; 'unhappy': 0.16; 'url:stackless': 0.16; 'url:starship': 0.16; 'xxx,': 0.16; 'later': 0.16; 'wrote:': 0.17; 'abuse': 0.17; 'stefan': 0.17; 'module': 0.19; 'discussion': 0.20; 'changes': 0.20; 'gmbh': 0.20; 'mostly': 0.20; 'trying': 0.21; 'import': 0.21; 'error.': 0.21; 'not,': 0.21; 'sponsor': 0.21; 'cc:2**0': 0.23; "python's": 0.23; 'sets': 0.23; 'patch': 0.24; 'cc:no real name:2**0': 0.24; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'logging': 0.27; '2.6': 0.27; 'important.': 0.27; 'ride': 0.27; 'lines': 0.28; 'chris': 0.28; 'run': 0.28; 'end,': 0.29; 'enforce': 0.29; 'separated': 0.29; 'served': 0.29; 'unchanged': 0.29; 'source': 0.29; "i'm": 0.29; 'worked': 0.30; 'subject: ?': 0.30; 'function': 0.30; 'stuff': 0.30; 'code': 0.31; 'point': 0.31; 'url:python': 0.32; 'could': 0.32; 'print': 0.32; 'cases,': 0.33; 'utility': 0.33; "can't": 0.34; 'changed': 0.34; 'christian': 0.34; 'done': 0.34; 'needed': 0.35; 'said,': 0.35; 'skip:k 20': 0.35; 'today?': 0.35; 'doing': 0.35; 'but': 0.36; 'wanted': 0.36; 'problems': 0.36; 'enough': 0.36; 'ok,': 0.37; 'unter': 0.37; 'two': 0.37; 'why': 0.37; '(for': 0.37; 'maintaining': 0.37; 'quite': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'some': 0.38; 'things': 0.38; 'several': 0.39; 'future.': 0.62; 'more': 0.63; 'it!': 0.64; 'here': 0.65; 'subject:there': 0.65; 'battle': 0.84; 'find.': 0.84; 'isolated': 0.84; 'n.a.': 0.84; 'story:': 0.84; 'received:89': 0.86 Date: Wed, 27 Jun 2012 16:34:31 +0200 From: Christian Tismer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Stefan Behnel Subject: Re: Why has python3 been created as a seperate language where there is still python2.7 ? References: <1340509604.38915.YahooMailClassic@web164605.mail.gq1.yahoo.com> <4fe92df1$0$29978$c3e8da3$5496439d@news.astraweb.com> <4FEADFB4.5090301@stackless.com> <4FEB077E.1010607@stackless.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 69 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1340807684 news.xs4all.nl 6844 [2001:888:2000:d::a6]:57127 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:24517 On 27.06.12 15:44, Stefan Behnel wrote: > Christian Tismer, 27.06.2012 15:15: >> print, function or not, is not important enough to enforce a rewrite >> everywhere because of syntax error. That hides the real semantic >> changes which _are_ important. >> >> So what I would have done is to let it work in an imperfect way. People >> then have the chance to rewrite with the print function, where it makes >> sense. But old packages which need to be changed, only because they >> have lots of >> >> if DEBUG: >> print xxx, yyy, ... >> >> could just stay unchanged or migrated later after the real meat has >> been properly tested etc. > Well, at least a SyntaxError makes it easy to find. And even if you don't > intend to use 2to3, you can still run it once to generate a patch for you > that only fixes up "print". In many cases, that will also make it work in > Py2 in such an "imperfect" way, either by doing the right thing already or > by printing out a tuple instead of a space separated string. If it's only > for debug output (which, as I said, would better be served by the logging > module), I can't see why that would be all that unacceptable. > Ok, here comes the real story: I extracted a few files from the old PIL package and made the stuff that was needed for my own little utility with a couple of monkey-patches, import hooks etc. After quite some trouble, this worked unter python 2.6 and 2.7, with the unchanged original PIL files. And I was after that: abuse PIL without maintaining it! Then I got real problems when trying to make it run under python 3.2, and from then on I needed two sets of source files, mostly because of the print mess. Most other things were adjustable by monkey-patches, moving to the io module etc. etc. In the end, the only thing that required a real change of source code that I could not circumvent was the indexing of bytes, which is giving chars under python 2.x, but integers under 3.x. At this point my hope to keep the unmodified PIL files died, although without print, this would have been an isolated single 20 lines block in the TiffImagePlugin only, instead of much more changes criss-cross over several sources. Anyway, I ended up with a port of the relevant PIL files to python 3 with some backward-compatible additions (for heaven's sake, at least python 3 accepts the __future__ imports), so now I'm down to single source files, but unfortunately changed files, and I have to track changes in the future. That battle was lost: I wanted the PIL files simply to be drop-ins, without going to work on PIL, because then I would do a complete rewrite after some discussion with the author. That's why I was unhappy with py3's missing flexibility. ciao -- Chris -- Christian Tismer :^) tismerysoft GmbH : Have a break! Take a ride on Python's Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/ 14482 Potsdam : PGP key -> http://pgp.uni-mainz.de work +49 173 24 18 776 mobile +49 173 24 18 776 fax n.a. PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/