Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin1!goblin.stu.neva.ru!news.astraweb.com!border5.a.newsrouter.astraweb.com!news.tele.dk!news.tele.dk!small.news.tele.dk!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '21,': 0.07; 'versions.': 0.07; 'whichever': 0.09; 'will,': 0.09; 'runs': 0.10; 'cc:addr :python-list': 0.11; 'python': 0.11; 'project,': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'happily': 0.16; 'other,': 0.16; 'presume': 0.16; 'worst': 0.16; 'subject:python': 0.16; 'so.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'projects,': 0.19; 'cc:addr:python.org': 0.22; 'features,': 0.24; 'decide': 0.24; 'fine': 0.24; 'versions': 0.24; 'cc:2**0': 0.24; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'specifically': 0.29; 'feature': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'getting': 0.31; 'alan': 0.31; 'probably': 0.32; 'fri,': 0.33; 'skip:# 10': 0.33; "can't": 0.35; 'test': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'in.': 0.36; "didn't": 0.36; 'too': 0.37; 'two': 0.37; 'that,': 0.38; 'does': 0.39; 'even': 0.60; 'no.': 0.61; 'between': 0.67; 'mar': 0.68; 'meyer': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=Cuhi9trGFEYPJZ19EjHNz6txkALRFWTCrZez6t/iYto=; b=pF8cL/rPxHYGiXJrFex0eI7wwLfpx7xXyNqBzz4GuOpWiIoDGeid0vQmgY7CJvKlxT i8Mpl2syE6rBMTcc571BHrX2fTRCEEMb3s3DMdVvuX+6D8OdnHDYWqPoV0Fm0GgyqqpN PvUOZfzYnXT4m0b7x+TqELQsdIG7Essn96OME52YIyAzMBL+XlJQ3tJHcVfmzBmnW7do yK9nneLKGh4lKvi2BasB4hKVRkak36D8gQAmQEoBToDi84UF1g+re2nJ3FgElOVl+gpL /zybJgPcq0tZxCFhi+zDTDz8utuY0iDY6Up4CG5UeI2gZh5rk8vr7FkUJVnZh9FKVKd0 10TQ== MIME-Version: 1.0 X-Received: by 10.68.235.6 with SMTP id ui6mr48479292pbc.45.1395356698174; Thu, 20 Mar 2014 16:04:58 -0700 (PDT) In-Reply-To: <87eh1wpr96.fsf@elektro.pacujo.net> References: <87ob10nbeh.fsf@elektro.pacujo.net> <532B4750.2090006@yahoo.com> <87eh1wpr96.fsf@elektro.pacujo.net> Date: Fri, 21 Mar 2014 10:04:58 +1100 Subject: Re: running python 2 vs 3 From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395356701 news.xs4all.nl 2845 [2001:888:2000:d::a6]:55451 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68639 On Fri, Mar 21, 2014 at 7:08 AM, 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. They're not that far apart. It's not difficult to write code that runs happily on both. However, it does mean you can't take advantage of Python 3 features, so it's probably better to write for one or the other, unless you specifically want wide distribution. For your own projects, just put whichever you need. ChrisA