Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70385

Re: Why Python 3?

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed1.swip.net!uio.no!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 <rosuav@gmail.com>
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; 'third-party': 0.04; 'subject:Python': 0.06; 'fixes': 0.07; 'stops': 0.07; 'advance': 0.07; 'committing': 0.09; 'line:': 0.09; 'strings.': 0.09; 'subject:Why': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '2.7': 0.14; "wouldn't": 0.14; '__future__': 0.16; 'assumptions': 0.16; 'eliminating': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'magic': 0.16; 'roy': 0.16; 'sat,': 0.16; 'all.': 0.16; 'so.': 0.16; 'wrote:': 0.18; 'seems': 0.21; '(the': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'unicode': 0.24; 'cc:2**0': 0.24; 'right.': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'quickly': 0.29; 'strongly': 0.30; 'waste': 0.30; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'division': 0.31; "we're": 0.32; 'older': 0.33; 'third': 0.33; 'there,': 0.34; 'agree': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; '2.6': 0.36; 'doing': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'should': 0.36; 'minimum': 0.38; 'problems': 0.38; 'hat': 0.38; 'needed': 0.38; 'pm,': 0.38; 'support,': 0.39; 'supporting': 0.39; 'skip:u 10': 0.60; 'future': 0.60; 'catch': 0.60; 'problems.': 0.60; 'reaching': 0.61; 'you.': 0.62; "you'll": 0.62; 'chance': 0.65; 'smith': 0.68; 'soon.': 0.71; 'bastion': 0.84; 'ships': 0.84; 'absolutely': 0.87; 'eliminates': 0.91; '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=IY0Ztu+caWjQxst6nix7tSsRXwvVrDVx6vcwGnXe+IE=; b=bIJuVgngDD6GTAj42QWYInE3EG7Sf9YAPTb/bqnca+E309ReKzyOuFqSSsiIDleozB kpTNDOEKfAzZ5ypHUBvLHdATqDqTy8lCP7hoorv6dWugsjJVm6+BDD+Mc5sMxGjZPXCG mDlSzWyPZOLpnYcuDFyauXoIy3jzWScwb5jvqS7BOqCpEZDUdtewgU4C4pqBDz+9Tl4/ Bsrb7Xr/waHAtaOTsbBGuDFDwlwr2l0ZZyEuzVAKMhUg03YedZbJyfqdBGrjWMc/cb4N AGIFkBnHPC2j0GhAt+CQHd4RKBBJ0LBbWwE95TNVvw/IRn4RuDG3s/QmCgkPl0XNh0sH jqAA==
MIME-Version 1.0
X-Received by 10.58.219.233 with SMTP id pr9mr24287864vec.10.1397914967728; Sat, 19 Apr 2014 06:42:47 -0700 (PDT)
In-Reply-To <roy-4A6688.09265319042014@news.panix.com>
References <mailman.9344.1397878113.18130.python-list@python.org> <7x8ur1esa5.fsf@ruckus.brouhaha.com> <mailman.9352.1397892885.18130.python-list@python.org> <roy-4A6688.09265319042014@news.panix.com>
Date Sat, 19 Apr 2014 23:42:47 +1000
Subject Re: Why Python 3?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.9361.1397914974.18130.python-list@python.org> (permalink)
Lines 44
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1397914974 news.xs4all.nl 2885 [2001:888:2000:d::a6]:40300
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:70385

Show key headers only | View raw


On Sat, Apr 19, 2014 at 11:26 PM, Roy Smith <roy@panix.com> wrote:
> Chris Angelico <rosuav@gmail.com> wrote:
>
>> I strongly recommend going for Python 3 unless something actually
>> stops you from doing so.
>
> One of the problems is you don't know in advance if something is going
> to stop you.  By committing to P3 now, you are eliminating from possible
> future use, all of those third-party modules which only support P2.  And
> you don't know which of those you'll need until you sometime in the
> future.

Conversely, committing to Py2 now eliminates from possible future use
all modules which support only Py3. Is there strong evidence that one
of those groups is larger than the other?

>> If you absolutely must use Python 2, try to
>> aim for a minimum of 2.6 or 2.7
>
> That I absolutely agree with.  Unless I had some specific legacy use
> case I needed to continue to support, I wouldn't waste any time worrying
> about 2.5 support, and we're quickly reaching the point where the same
> can be said about 2.6.

Red Hat? :) Though that's likely to be the last bastion of ancient
Python out there, soon. Debian Squeeze (oldstable) ships with 2.6, so
if you aim for 2.6+, you should catch all the distros that derive from
Debian (the current Debian stable, Wheezy, ships with 2.7). But Red
Hat will be supporting older Pythons for a good while.

>> and start your program with this line:
>>
>> from __future__ import print_function, unicode_literals, division
>
> That seems reasonable, but be prepared for possible unicode issues.
> There is code out there in third party modules which makes
> unicode-unfriendly assumptions about strings.

Right. It's not the magic line that fixes everything; if it were,
Python 3 wouldn't be a big deal at all. Go Py3 if you can, but if you
can't, at least make your double-quoted strings Unicode strings, and
then you have a chance to find problems.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why Python 3? Anthony Papillion <papillion@gmail.com> - 2014-04-18 22:28 -0500
  Re: Why Python 3? Paul Rubin <no.email@nospam.invalid> - 2014-04-18 23:40 -0700
    Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-19 17:34 +1000
      Re: Why Python 3? Roy Smith <roy@panix.com> - 2014-04-19 09:26 -0400
        Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-19 23:42 +1000
        Re: Why Python 3? Albert-Jan Roskam <fomcl@yahoo.com> - 2014-04-19 10:57 -0700
        Re: Why Python 3? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-20 10:07 +0000
    Re: Why Python 3? Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-19 03:25 -0600
      Re: Why Python 3? Marko Rauhamaa <marko@pacujo.net> - 2014-04-19 12:59 +0300
    Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-19 19:37 +1000
      Integer and float division [was Re: Why Python 3?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-20 11:02 +0000
        Re: Integer and float division [was Re: Why Python 3?] Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-04-20 15:38 +0300
          Re: Integer and float division [was Re: Why Python 3?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-20 15:09 +0000
        Re: Integer and float division [was Re: Why Python 3?] Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-21 11:44 +1200
    Re: Why Python 3? Terry Reedy <tjreedy@udel.edu> - 2014-04-19 13:23 -0400
      Re: Why Python 3? Paul Rubin <no.email@nospam.invalid> - 2014-04-19 20:25 -0700
        Re: Why Python 3? Ben Finney <ben+python@benfinney.id.au> - 2014-04-20 19:15 +1000
        Re: Why Python 3? Walter Hurry <walterhurry@lavabit.com> - 2014-04-20 23:50 +0000
          Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-21 10:00 +1000
            Re: Why Python 3? HoneyMonster <nobody@someplace.invalid> - 2014-04-21 04:08 +0000
          Re: Why Python 3? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-21 01:11 +0100
    Re: Why Python 3? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-19 18:31 +0100
    Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-20 03:53 +1000
    Re: Why Python 3? Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-19 13:58 -0600
    Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-20 06:31 +1000
      Re: Why Python 3? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-20 13:06 +1200
        Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-20 11:28 +1000
          Re: Why Python 3? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-21 10:52 +1200
            Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-21 09:24 +1000
              Re: Why Python 3? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-21 03:43 +0000
                Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-21 14:43 +1000
                Re: Why Python 3? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-22 09:58 +1200
                Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-21 14:48 +1000
                Re: Why Python 3? wxjmfauth@gmail.com - 2014-04-21 02:42 -0700
                Re: Why Python 3? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-22 10:28 +1200
                Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-22 08:43 +1000
                Re: Why Python 3? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-22 18:03 +1200
        Re: Why Python 3? Terry Reedy <tjreedy@udel.edu> - 2014-04-20 00:17 -0400
          Re: Why Python 3? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-21 11:13 +1200
            Re: Why Python 3? Terry Reedy <tjreedy@udel.edu> - 2014-04-20 20:09 -0400
    Re: Why Python 3? Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-19 14:38 -0600
    Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-20 06:53 +1000
      Re: Why Python 3? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-20 13:35 +1200
    Re: Why Python 3? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-20 09:59 +0000
      Unicode in Python Rustom Mody <rustompmody@gmail.com> - 2014-04-21 20:57 -0700
        Re: Unicode in Python Terry Reedy <tjreedy@udel.edu> - 2014-04-22 01:44 -0400
          Re: Unicode in Python Rustom Mody <rustompmody@gmail.com> - 2014-04-21 23:18 -0700
            Re: Unicode in Python Chris Angelico <rosuav@gmail.com> - 2014-04-22 16:32 +1000
        Re: Unicode in Python Steven D'Aprano <steve@pearwood.info> - 2014-04-22 06:11 +0000
          Re: Unicode in Python Rustom Mody <rustompmody@gmail.com> - 2014-04-21 23:30 -0700
            Re: Unicode in Python Chris Angelico <rosuav@gmail.com> - 2014-04-22 16:44 +1000
            Re: Unicode in Python wxjmfauth@gmail.com - 2014-04-22 02:07 -0700
              Re: Unicode in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-22 12:21 +0000
                Re: Unicode in Python wxjmfauth@gmail.com - 2014-04-22 08:28 -0700
        Re: Unicode in Python Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-22 00:31 -0600
          Re: Unicode in Python Rustom Mody <rustompmody@gmail.com> - 2014-04-22 02:23 -0700
          Re: Unicode in Python Rustom Mody <rustompmody@gmail.com> - 2014-04-22 11:09 -0700
    Re: Why Python 3? Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-20 10:22 -0600
      Re: Why Python 3? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-21 11:56 +1200
        Re: Why Python 3? Ian Kelly <ian.g.kelly@gmail.com> - 2014-04-20 18:29 -0600
    Re: Why Python 3? MRAB <python@mrabarnett.plus.com> - 2014-04-20 17:41 +0100
    Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-21 02:46 +1000
      Re: Why Python 3? Roy Smith <roy@panix.com> - 2014-04-20 14:40 -0700
        Re: Why Python 3? Terry Reedy <tjreedy@udel.edu> - 2014-04-20 17:58 -0400
        Re: Why Python 3? Richard Damon <Richard@Damon-Family.org> - 2014-04-20 18:02 -0400
          Re: Why Python 3? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-21 12:22 +1200
        Re: Why Python 3? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-21 02:13 +0000
  Re: Why Python 3? Steve Hayes <hayesstw@telkomsa.net> - 2014-04-19 13:53 +0200
    Re: Why Python 3? Chris Angelico <rosuav@gmail.com> - 2014-04-19 22:46 +1000
    Re: Why Python 3? Rustom Mody <rustompmody@gmail.com> - 2014-04-19 08:59 -0700
  Re: Why Python 3? Rick Johnson <rantingrickjohnson@gmail.com> - 2014-04-19 07:41 -0700
  Re: Why Python 3? Thomas Lehmann <thomas.lehmann.private@googlemail.com> - 2014-05-06 09:28 -0700

csiph-web