Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Stop writing Python 4 incompatible code Date: Thu, 14 Jan 2016 10:38:57 +1300 Lines: 18 Message-ID: References: <5695fd0e$0$11119$c3e8da3@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net T7pWkWvdJXm3qX049BgHqQoU+HXSDSrhLVpbR0neMMCEvq/RHf Cancel-Lock: sha1:OY5lRskZEIsgyERkUE36/DOVgjQ= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: <5695fd0e$0$11119$c3e8da3@news.astraweb.com> Xref: csiph.com comp.lang.python:101636 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! -- Greg