Python 2.X vs. 3.X - level of acceptance?

Discussion in 'Python' started by Stephan Schulz, Apr 27, 2010.

  1. Hi!

    I've been using Python for a long while (certainly since it was 1.X),
    and I've taught some aspects of it in my lectures. I'm now thinking of
    preparing a new lecture where some of the theoretical concepts will be
    illustrated by implementations of e.g. automata and DPLL provers,
    preferably in Python.

    I'm so far only familiar with Python 2.X. Is Python 3 sucessful enough
    to make a switch worthwhile now? Or will students still face an
    infrastructure with mostly Python 2.X deployed in, say, 2 years time,
    when they graduate?

    Bye,

    Stephan

    --
    -------------------------- It can be done! ---------------------------------
    Please email me as (Stephan Schulz)
    ----------------------------------------------------------------------------
     
    Stephan Schulz, Apr 27, 2010
    #1
    1. Advertising

  2. Stephan Schulz, 27.04.2010 12:57:
    > I've been using Python for a long while (certainly since it was 1.X),
    > and I've taught some aspects of it in my lectures. I'm now thinking of
    > preparing a new lecture where some of the theoretical concepts will be
    > illustrated by implementations of e.g. automata and DPLL provers,
    > preferably in Python.
    >
    > I'm so far only familiar with Python 2.X. Is Python 3 sucessful enough
    > to make a switch worthwhile now? Or will students still face an
    > infrastructure with mostly Python 2.X deployed in, say, 2 years time,
    > when they graduate?


    Most likely, yes, although it will depend very much on the exact spot you
    look at. In two years time, I'd expect that the mass of open-source
    projects will have made the switch, many companies will have followed, but
    many others will still be using Py2. It depends on the size of their code
    base, the availability of truly required dependencies, the urge to keep
    using a well supported and future proof runtime, and various non-technical
    issues.

    Anyway, if you intend to use Python for teaching, I'd consider it worth
    teaching Py3 now, simply because it's a cleaner language that goes out of
    your way another little bit more than Py2. It's also less outdated cruft to
    talk about, e.g. old-style classes are gone, unicode issues are mostly gone
    or at least easier to explain (and worth explaining when they occur). It's
    just more fun to work with. :)

    Just my two €-cents...

    Stefan
     
    Stefan Behnel, Apr 27, 2010
    #2
    1. Advertising

  3. Stephan Schulz

    Peter Otten Guest

    Stephan Schulz wrote:

    > I've been using Python for a long while (certainly since it was 1.X),
    > and I've taught some aspects of it in my lectures. I'm now thinking of
    > preparing a new lecture where some of the theoretical concepts will be
    > illustrated by implementations of e.g. automata and DPLL provers,
    > preferably in Python.
    >
    > I'm so far only familiar with Python 2.X. Is Python 3 sucessful enough
    > to make a switch worthwhile now? Or will students still face an
    > infrastructure with mostly Python 2.X deployed in, say, 2 years time,
    > when they graduate?


    I think you can make the decision light-heartedly, based on the current
    availability of libraries you'd like your students to use. The difficulty of
    switching between 2.x and 3.x in whatever direction is likely several
    magnitudes smaller than grokking the contents of your lecture.

    That said, I expect 2.x to dominate for the next five rather than two years.

    Peter
     
    Peter Otten, Apr 27, 2010
    #3
  4. Stephan Schulz

    Roger Binns Guest

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On 04/27/2010 03:57 AM, Stephan Schulz wrote:
    > Is Python 3 sucessful enough to make a switch worthwhile now?


    The language/interpreter is just fine. The biggest problem is 3rd party
    modules. My own module (APSW) has been available since the early betas of
    Python 3 and I make it available for Python 2.3 onwards.

    I have a release every month or two, and so you can see adoption trends for
    Windows users over time:

    http://code.google.com/p/apsw/downloads/list?can=1&q=binary

    Python 2.6 is by far the most popular, but 3.1 is picking up. It is
    disturbing just many 2.3 users there still are though.

    Roger
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.10 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iEYEARECAAYFAkvXFTUACgkQmOOfHg372QR7YwCgpZdsgkV9iBy/1/8eIBwxy3S4
    Sy8AoI8vsivExNADG9Bmx+WbWTQN74VD
    =0lxT
    -----END PGP SIGNATURE-----
     
    Roger Binns, Apr 27, 2010
    #4
  5. Stephan Schulz

    John Nagle Guest

    Roger Binns wrote:
    > On 04/27/2010 03:57 AM, Stephan Schulz wrote:
    >> Is Python 3 sucessful enough to make a switch worthwhile now?

    >
    > The language/interpreter is just fine. The biggest problem is 3rd party
    > modules.


    Indeed. Python 3 is a good language, and the CPython interpreter
    is in good shape, but many key modules aren't ready for prime time
    under Python 3 yet.

    For teaching purposes, I'd teach Python 3. Most Python 3 code
    will run in 2.6/2.7, more or less.

    I have a Python 3.1 installed for fun, but I can't actually
    do much useful with it until the MySQLdb module fully supports it.

    John Nagle
     
    John Nagle, Apr 28, 2010
    #5
  6. Stephan Schulz

    TerryP Guest

    For the most part keeping new code compatible with both Python 2.6 and
    3.1 isn't a challenge, the most noticeable issue is with string data.
    The obvious downside is if the code has to run on an interp that
    doesn't understand the modern 'except ClassName as varname:' thing.
     
    TerryP, Apr 28, 2010
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Jorgensen

    Acceptance test spike example

    Steve Jorgensen, Jun 27, 2005, in forum: Python
    Replies:
    6
    Views:
    330
    Steve Jorgensen
    Jun 30, 2005
  2. The Eternal Squire

    where can I find Python acceptance test suite?

    The Eternal Squire, Aug 6, 2006, in forum: Python
    Replies:
    2
    Views:
    368
    The Eternal Squire
    Aug 7, 2006
  3. pabbu
    Replies:
    8
    Views:
    772
    Marc Boyer
    Nov 7, 2005
  4. shawn

    Resubmit w/o Browser Acceptance?

    shawn, May 31, 2004, in forum: ASP General
    Replies:
    1
    Views:
    104
  5. Replies:
    0
    Views:
    185
Loading...

Share This Page