Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Bernardo Sulzbach Newsgroups: comp.lang.python Subject: Re: Stop writing Python 4 incompatible code Date: Wed, 13 Jan 2016 19:46:20 -0200 Lines: 25 Message-ID: References: <5695fd0e$0$11119$c3e8da3@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de E80lH7aTcaKr4pWmv3ttrQCRXfevvyQ76zk9VSlVUieg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'elif': 0.04; 'subject:Python': 0.05; 'executed': 0.07; 'subject:code': 0.07; 'python': 0.10; 'jan': 0.11; 'wed,': 0.15; '2016': 0.16; 'bugs.': 0.16; 'executed,': 0.16; 'finish.': 0.16; 'gregory': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:writing': 0.16; 'wrote:': 0.16; 'header:In-Reply-To:1': 0.24; 'bugs': 0.27; 'message-id:@mail.gmail.com': 0.27; '13,': 0.29; 'code': 0.30; 'everyone': 0.31; "can't": 0.32; "d'aprano": 0.33; 'exhibit': 0.33; 'steven': 0.33; 'case,': 0.34; 'received:google.com': 0.35; 'tasks': 0.35; 'should': 0.36; 'received:209.85': 0.36; 'faster': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'programs': 0.62; 'all!': 0.84; 'bernardo': 0.84; 'subject:Stop': 0.84; 'good,': 0.93; 'imagine': 0.96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=CorEGfFpbgkNX6GLLl0RsxePY/KwfaypXE909/kCzj8=; b=pp7iY0M/EQi/22D4y5WmcvDCnc5V1Tn7soFqGfiyUH85sgiDLoM5JDBUgNa7/77LPk +HsGXd4n/L7UDS0mSKuS6jdOn7idIh0zPPkH2IKcKKeM0qfQ2qP6nHKwABBlcWfFeD2Q M2O82NQBXZu7M1MM481Jd5KIP8U7Ib0jMFJlAyQN5P/iLnfQa1GloFj4knnTaCpa07AJ cOoOKop70GbJdsHjVhQbNlzDmE40uJyKLta/zLTkvCjSK3hXJYTA9anF2yYcjVSXI7Sn PwaaUaOskXxC61KMOZN0YjTaiMWtwbdXMsFfWXan0j2XxgmPuIzStiAveg/wKmBZus85 9qgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=CorEGfFpbgkNX6GLLl0RsxePY/KwfaypXE909/kCzj8=; b=gvrGv4AxwXI5wn+7rMaJ/eZ3b3tHUfQ8GPSP7iNjkfCS7pT+cjM+DLWjqTAmtoJNnj pVyqrrP32UI3bhFaKArfSNCx1dZDGW+fp8yRbt+CzfLfrOUmqRLYjQDYaCcnwl9LwwsC VctLy3Grc4AJeM9oM5NIdzyWBati6tB4kXT+trCYYCpBTKcwebH4ZKyX+QWZHEvRbotr e/hNhJMLCio29jY+Y/XXFD5JToTljNNxJZlbLyRFwq5RSqkdPJ+UlpW3mWU/REZWwym+ L3v8agVr+j56Env/lATWIGxDw+GakkMR4ua/soCAuL05BcHaq5P8GRdBdr4oIejHHFts dUmg== X-Gm-Message-State: ALoCoQk2F+Vgqt9i8pjG46yBD0PmUcrqFh8LKSMQdjHucWlZv8qs5J2ipha/QPwpMBwnO6u2Gb4rWqY4Vb1HujRI25fcp+FJKA== X-Received: by 10.112.242.167 with SMTP id wr7mr138823lbc.69.1452721619647; Wed, 13 Jan 2016 13:46:59 -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:101638 On Wed, Jan 13, 2016 at 7:38 PM, Gregory Ewing wrote: > Steven D'Aprano wrote: >> >> Quote: >> >> if six.PY2: >> # Python 2 code >> elif six.PY3: >> # Python 3 code >> >> In this case, no code will get executed on Python 4 at all! > > > Which is good, because if no code is executed, it can't exhibit > any bugs. > > Everyone should write their code this way, and then Python 4 > will make *all* bugs in *all* programs disappear! > And if that is not enough, imagine how faster all tasks will finish. -- Bernardo Sulzbach