[Python-Dev] Python 2.x and 3.x use survey, 2014 edition

Zachary Ware zachary.ware+pylist at gmail.com
Sat Dec 13 12:47:40 EST 2014


On Sat, Dec 13, 2014 at 9:51 AM, Grant Edwards <invalid at invalid.invalid> wrote:
> On 2014-12-10, Bruno Cauet <brunocauet at gmail.com> wrote:
>
>> Nathaniel, I'm not sure about that: even if the code is 2- and 3-compatible
>> you'll pick one runtime.
>
> Why do you say that?
>
> I have both installed.  I use both.  Sometimes it depends on which
> OS/distro I'm running, sometimes other reasons prevail.

Just to give another anecdote, I wrote myself a little tool last night
for visualizing healthcare scenarios to help my family decide which
insurance plan to choose this year.  I didn't realize until I added
'subTest's to the tests and mistakenly invoked them as "python -m
test" instead of "python3 -m test" that I'd accidentally written it to
be 2/3 compatible!  I took the subTest back out, and tests pass with
both interpreters.

-- 
Zach

(If such a tool could be useful to anyone, I can post it on
BitBucket/GitHub.  Its support for all possibilities is far from
complete, but it helped us a bit.  Also, I make no guarantees that you
won't want to gouge your eyes out reading the code, but that
*shouldn't* happen ;)



More information about the Python-list mailing list