Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; ';-)': 0.03; 'explicitly': 0.05; 'scipy': 0.05; 'subject:Python': 0.06; '(python': 0.07; "'python": 0.09; 'typed': 0.09; 'worked.': 0.09; 'cc:addr:python- list': 0.11; 'python': 0.11; 'wrote': 0.14; 'declaration': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'point!': 0.16; 'separated': 0.16; 'subclass': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'feb': 0.22; 'code,': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; 'went': 0.31; 'code': 0.31; '13,': 0.31; 'class': 0.32; 'compatible': 0.32; '(most': 0.33; 'fri,': 0.33; 'definition': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'object,': 0.36; 'done': 0.36; "didn't": 0.36; 'changing': 0.37; 'effort': 0.37; 'two': 0.37; 'issue': 0.38; 'track': 0.38; 'easy': 0.60; 'skip:* 10': 0.61; 'today': 0.64; 'afraid': 0.65; 'other.': 0.75; '2015': 0.84; 'habit': 0.91; 'to:none': 0.92; 'incredibly': 0.96 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=v7HgerAwAWlZNKcL2V+X/TeMdykXHgu4jdJLidHIVgY=; b=uEW88tsJDJCDK/JhOWRBS28hFHKyOLmQ8GLdg+JYjEZTHrWfXFp3Dwdadt2KnBqQZM qFU+dJrA0KrNPCZD+76+BCOmefIEp9lxp7vBAOiuoZ1WrNU6dkxQ8JYDYTZTQNW4oIGP FS8aVuA8DQA7B+/oE+MGT7Gl6dovmySKzEgejr6RXf63lTS6OMpc6bEmKd4EqlGxWiX/ cmNW1edXitwbkq4mj/yThpXcEVVUZQjx5LQ5wb8nklNemgHGb0OM2GOdlADFQAZR+qD9 MIUc3O7Ri5rtGl+0XzQKon/FXMwpURxBRE0fnGIO2LunsOQEixvor9+bsztgrGmPQwa9 jiMA== MIME-Version: 1.0 X-Received: by 10.107.158.146 with SMTP id h140mr5429223ioe.27.1423756787806; Thu, 12 Feb 2015 07:59:47 -0800 (PST) In-Reply-To: <87twyrchxi.fsf@elektro.pacujo.net> References: <54dc6870$0$12981$c3e8da3$5496439d@news.astraweb.com> <6322f4fa-c8af-4051-b6c6-ff953bd928ca@googlegroups.com> <87zj8jcqxr.fsf@elektro.pacujo.net> <87twyrchxi.fsf@elektro.pacujo.net> Date: Fri, 13 Feb 2015 02:59:47 +1100 Subject: Re: Python discussed in Nature From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1423756796 news.xs4all.nl 2935 [2001:888:2000:d::a6]:50722 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:85586 On Fri, Feb 13, 2015 at 1:39 AM, Marko Rauhamaa wrote: > Fabien : > >> But this was exactly my point! Today in 2015 it's incredibly easy to >> write py2/py3 code for a scientist. The whole SciPy track has done the >> transition. Not an issue anymore either, for me at least (python >> youngster ;-) > > I write both Py2 and Py3 code, but I keep the two worlds hermetically > separated from each other. One of my students wrote some code for Python 3, and when I went to test it, I typed 'python scriptname' out of habit (most of my students use Py2)... and it almost perfectly worked. The only part that didn't was a class definition that didn't explicitly subclass object, and then used @property. Just changing that class declaration would have made his code 2/3 compatible - and he didn't put any effort into it at all. He literally made his code *accidentally* (almost-)Py2-compatible. You don't need to be afraid of the gap. ChrisA