Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Python 2 vs Python 3 for teaching Date: Mon, 2 Nov 2015 01:52:43 +1100 Lines: 15 Message-ID: References: <201511011449.tA1Enbbp024177@fido.openend.se> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de mQ369fV6xedJjsZeMgEMMAIJ000XZN0KQLGisBvwkFKA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'cc:addr:python-list': 0.09; '2to3': 0.09; 'creighton': 0.09; 'prefixes': 0.09; 'python': 0.10; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'scratch': 0.16; 'wrote:': 0.16; 'byte': 0.18; 'laura': 0.18; 'stick': 0.18; 'library': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; '2.x': 0.22; '3.x': 0.22; 'ascii': 0.22; 'am,': 0.23; '(or': 0.23; 'header:In-Reply- To:1': 0.24; 'mon,': 0.24; 'message-id:@mail.gmail.com': 0.27; 'converting': 0.27; 'idea': 0.28; 'strings,': 0.29; 'there.': 0.30; "we're": 0.30; 'code': 0.30; 'branch': 0.30; 'received:google.com': 0.35; 'nov': 0.35; 'possible,': 0.35; 'templates': 0.35; 'unicode': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'building': 0.38; 'rather': 0.39; 'where': 0.40; 'easy': 0.60; 'our': 0.64; 'other.': 0.64; 'six': 0.65; 'chrisa': 0.84; 'etc,': 0.84; 'to:none': 0.91 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=ff0PJ18AMbWBqQKwBzn4zQ4FNpr8xx/ki+eya/Homjg=; b=vH8OjPrRgSCVPiaByymhvqY0bFTJoFqez6GsfNOGeyX6BPoPTjpqqgn4KcvQ8fakPb JnUKJHKvMCAQoeXfBuempysgxaeemSMh7KE3NpbzThTzVoXOXwzn3sSDZIHGue3jfuaO WhnA/+M9Ypsqn6+ssSj5rLVxc/Lc6GQ5/bK3rXua/za/8r8JZZTNZTeMuxDq/rX4x4fH FdNqjlwuD7pFbDpRzi+LvNxSO5yfbsDv7Uk+DEozasDrkbEQBC6Mp6cG2ywKgIUc/dvt T8XeyzEX5pvL1xurXWomdhhYd55KVYQBOS/di4dIheZYOYrpnNTPZoQ5k6ORbHhZsUkw nvsA== X-Received: by 10.50.88.4 with SMTP id bc4mr7449040igb.94.1446389563888; Sun, 01 Nov 2015 06:52:43 -0800 (PST) In-Reply-To: <201511011449.tA1Enbbp024177@fido.openend.se> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98048 On Mon, Nov 2, 2015 at 1:49 AM, Laura Creighton 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