Stop writing Python 4 incompatible code
Bernardo Sulzbach
mafagafogigante at gmail.com
Wed Jan 13 16:46:20 EST 2016
On Wed, Jan 13, 2016 at 7:38 PM, Gregory Ewing
<greg.ewing at canterbury.ac.nz> 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
More information about the Python-list
mailing list