Path: csiph.com!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: Tue, 3 Nov 2015 01:10:19 +1100 Lines: 20 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de tMD1ma/J7yLUd4GRwS9vcAM9wJDzRVhPzxcYGvtcIt0g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; 'used.': 0.05; 'cc:addr:python-list': 0.09; 'python': 0.10; '"python': 0.16; 'argument.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'py3': 0.16; 'quant': 0.16; 'received:209.85.213.176': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'circular': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; '2.x': 0.22; '3.x': 0.22; 'libraries': 0.22; 'am,': 0.23; 'code.': 0.23; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'message- id:@mail.gmail.com': 0.27; 'print': 0.30; 'books': 0.30; 'code': 0.30; 'common': 0.33; 'similar': 0.33; 'tue,': 0.34; 'received:google.com': 0.35; 'nov': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'things': 0.38; 'doing': 0.38; 'received:209': 0.38; 'mean': 0.38; 'data': 0.39; 'rather': 0.39; 'well.': 0.40; 'still': 0.40; 'more': 0.63; 'differences': 0.66; 'python-list': 0.66; 'teach': 0.70; 'chrisa': 0.84; 'computing.': 0.84; 'enumeration': 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:content-transfer-encoding; bh=LcbYH5vzH6L8EyWpCO07BE0xm6snNEdhf/Esj7SELjY=; b=TCJRUshAIVUQxVeu7misdSHrIutDy4Hhn4NV7ZVBLnvHf1QDN7VPhgb/GPM5MIjQgH alfsHgEnKzBFXQ9ejJrl9CIGDP+8g2fL9sZHrx8PEh/g/L0XclP/skgSHzQyWqeGyDTc u3Tjcu4UB/0kFwwaK4rEuJ+O0BbLZsaWRoXlu79U48+O6j2TrzoXEBoNbf+hpo0pIbFk 8GwBm+fYbdtvDjB5VPQb8rexv5/JBocnxfZeWYbjtL2wm+KJlkXaoZu+uHZ3v6QGFLPS zOIgy/XCTo8OuoPR5F/vo7kAnnRd6iPERe+QhOkvFmEFG0Bz1s11IFCnW9sPfQfAfjlJ hwGA== X-Received: by 10.50.83.104 with SMTP id p8mr11392349igy.13.1446473419710; Mon, 02 Nov 2015 06:10:19 -0800 (PST) In-Reply-To: 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:98100 On Tue, Nov 3, 2015 at 12:15 AM, beliavsky--- via Python-list wrote: > I think Python 2.x is still used more than Python 3.x in scientific compu= ting. The Python books I have in this area, such as "Python for Finance: An= alyze Big Financial Data" and "Python for Data Analysis", still use Python = 2.x . An aspiring computational scientist, data scientist, or financial qua= nt may still be better off learning Python 2.x but using print(x) rather th= an print x and doing other things to future-proof his code. > That doesn't mean that Python 3 *can't* be used. Far as I know, all the key libraries (numpy, pandas, statsmodels, scipy) are available for Python 3 as well. Recommending the use of Python 2 simply because all the books you have teach Python 2 is a purely circular argument. But yes. If you're going to use Py2, aim for the common subset. Good Py2 code is a lot more similar to good Py3 code than an enumeration of language-level differences would suggest. ChrisA