Python 2 vs Python 3 for teaching

Chris Angelico rosuav at gmail.com
Sun Nov 1 09:52:43 EST 2015


On Mon, Nov 2, 2015 at 1:49 AM, Laura Creighton <lac at 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



More information about the Python-list mailing list