Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.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; 'plenty': 0.07; 'versions.': 0.07; 'adopted': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'will,': 0.09; 'python': 0.11; 'project,': 0.12; 'presume': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'worst': 0.16; 'subject:python': 0.16; 'so.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'module': 0.19; 'header:User-Agent:1': 0.23; 'decide': 0.24; 'fine': 0.24; 'versions': 0.24; 'script': 0.25; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'feature': 0.29; 'code': 0.31; 'getting': 0.31; 'alan': 0.31; 'this.': 0.32; 'skip:# 10': 0.33; 'test': 0.35; 'really': 0.36; 'in.': 0.36; "didn't": 0.36; 'too': 0.37; 'two': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'that,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'no.': 0.61; 'great': 0.65; 'between': 0.67; 'six': 0.68; 'meyer': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: running python 2 vs 3 Date: Thu, 20 Mar 2014 16:27:59 -0400 References: <87ob10nbeh.fsf@elektro.pacujo.net> <532B4750.2090006@yahoo.com> <87eh1wpr96.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 18.189.9.83 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <87eh1wpr96.fsf@elektro.pacujo.net> 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: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395347407 news.xs4all.nl 2906 [2001:888:2000:d::a6]:46745 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68612 On 3/20/14 4:08 PM, Marko Rauhamaa wrote: > Alan Meyer : > >> I presume it would still be a good idea to test both python >> interpreters against any script that you didn't knowingly write with a >> feature that will only work in one of the two python versions. >> >> If it works fine in both - and many will, then use: >> >> #!/usr/bin/env python >> >> Only use the "python2" or "python3" versions if you really have a >> reason to do so. >> >> Yes? No? > > No. Even if you managed to do that, it would mean getting the worst of > both worlds. The language dialects are too far apart. When you start > your Python project, you decide between Python 2 and Python 3 and go all > in. Plenty of people have adopted a dual-support strategy, with one code base that supports both Python 2 and Python 3. The six module can help a great deal with this. > > > Marko > -- Ned Batchelder, http://nedbatchelder.com