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


Groups > comp.lang.python > #98048

Re: Python 2 vs Python 3 for teaching

From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: Python 2 vs Python 3 for teaching
Date 2015-11-02 01:52 +1100
Message-ID <mailman.25.1446389566.4463.python-list@python.org> (permalink)
References <CAPTjJmoPtk30rzoDOFnN5evRrd3kDtvie1E1F0Wu_DxWTsc+jA@mail.gmail.com> <CAJ4+4apy=ibu4r6d5vj707xoLYEty7MdaOtE+9oi3VOnehB+XA@mail.gmail.com> <CAPTjJmo+st5-iUZ0Fie7EZ7YnGjWioTpLDqFdOm359g521YwhQ@mail.gmail.com> <201511011449.tA1Enbbp024177@fido.openend.se>

Show all headers | View raw


On Mon, Nov 2, 2015 at 1:49 AM, Laura Creighton <lac@openend.se> wrote:
>>I'd rather not use 2to3 there. If you want to maintain a library that
>>can be used from 2.x and 3.x, it's much better to aim for the
>>compatible middle - u prefixes on all Unicode strings, b prefixes on
>>all byte strings, stick to ASCII where possible, etc, etc. Much easier
>>than writing code for one branch and then converting to the other.
>
> How about using six, same idea with the curriculum?

If we were building libraries, then yes, six would be the way to go.
But there's really no reason to bother - we're building applications
from scratch (or from templates that are under our control), so it's
easy to stipulate that Python 3.x is a prerequisite.

ChrisA

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


Thread

Re: Python 2 vs Python 3 for teaching Chris Angelico <rosuav@gmail.com> - 2015-11-02 01:52 +1100

csiph-web