Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #90243 > unrolled thread

Moving to Python 3.x

Started byAntranig Vartanian <antranig@pingvinashen.am>
First post2015-05-09 20:30 +0200
Last post2015-05-09 15:58 -0400
Articles 4 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  Moving to Python 3.x Antranig Vartanian <antranig@pingvinashen.am> - 2015-05-09 20:30 +0200
    Re: Moving to Python 3.x "Jason C. McDonald" <"i n d e l i b l e b l u e p e n "@ g m a  i l . c o m . i n v a l i d> - 2015-05-09 12:29 -0700
    Re: Moving to Python 3.x Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-09 13:49 -0600
    Re: Moving to Python 3.x Terry Reedy <tjreedy@udel.edu> - 2015-05-09 15:58 -0400

#90243 — Moving to Python 3.x

FromAntranig Vartanian <antranig@pingvinashen.am>
Date2015-05-09 20:30 +0200
SubjectMoving to Python 3.x
Message-ID<alpine.LNX.2.00.1505092025440.10854@Zvartnots>
Hay,

I learned the basics of python using the book "Think Python" 
(http://www.greenteapress.com/thinkpython/) which was good (IMHO), and it 
teaches in Python 2.7. Now I'm trying to write my first python+gtk 
program.

anyways, my question will be, is it so necessary to move to python3.x 
ASAP? or Python2.7 will live for a while (2-3 years)?.

and what do you advice a newbie programmer to do after learning the 
basics?

Thanks all!

--
Antranig Vartanian
http://antranig.pingvinashen.am/

[toc] | [next] | [standalone]


#90244

From"Jason C. McDonald" <"i n d e l i b l e b l u e p e n "@ g m a i l . c o m . i n v a l i d>
Date2015-05-09 12:29 -0700
Message-ID<miln4h$t15$1@dont-email.me>
In reply to#90243
On 05/09/2015 11:30 AM, Antranig Vartanian wrote:
> Hay,
>
> I learned the basics of python using the book "Think Python"
> (http://www.greenteapress.com/thinkpython/) which was good (IMHO), and
> it teaches in Python 2.7. Now I'm trying to write my first python+gtk
> program.
>
> anyways, my question will be, is it so necessary to move to python3.x
> ASAP? or Python2.7 will live for a while (2-3 years)?.
>
> and what do you advice a newbie programmer to do after learning the basics?
>
> Thanks all!
>
> --
> Antranig Vartanian
> http://antranig.pingvinashen.am/

I would strongly recommend writing your code to run on both Py2 and Py3. 
NINJA-IDE (an open source Python IDE) will lint your code so it'll run 
in both.

-- 
Jason C. McDonald (CodeMouse92)
[CEO, Lead Dev @ MousePaw Games]

[toc] | [prev] | [next] | [standalone]


#90245

FromIan Kelly <ian.g.kelly@gmail.com>
Date2015-05-09 13:49 -0600
Message-ID<mailman.288.1431201047.12865.python-list@python.org>
In reply to#90243
On Sat, May 9, 2015 at 12:30 PM, Antranig Vartanian
<antranig@pingvinashen.am> wrote:
> Hay,
>
> I learned the basics of python using the book "Think Python"
> (http://www.greenteapress.com/thinkpython/) which was good (IMHO), and it
> teaches in Python 2.7. Now I'm trying to write my first python+gtk program.
>
> anyways, my question will be, is it so necessary to move to python3.x ASAP?
> or Python2.7 will live for a while (2-3 years)?.

Python 2.7 will continue to be maintained through 2020. If you don't
have any specific reason to use Python 2.7 (such as a library
dependency), then you should try to use 3.x for new projects. You'll
avoid the pain of needing to migrate later, and you'll be able to
start taking advantage of newer features right away.

> and what do you advice a newbie programmer to do after learning the basics?

Find an existing open source project that you'd like to contribute to.
It doesn't have to be anything major, but it will help you learn about
the Python ecosystem, and the opportunities to collaborate will help
you build your skills. It also looks good on a resume, if your plans
include being a professional Python programmer.

[toc] | [prev] | [next] | [standalone]


#90246

FromTerry Reedy <tjreedy@udel.edu>
Date2015-05-09 15:58 -0400
Message-ID<mailman.289.1431201510.12865.python-list@python.org>
In reply to#90243
On 5/9/2015 2:30 PM, Antranig Vartanian wrote:
> Hay,
>
> I learned the basics of python using the book "Think Python"
> (http://www.greenteapress.com/thinkpython/) which was good (IMHO), and
> it teaches in Python 2.7. Now I'm trying to write my first python+gtk
> program.
>
> anyways, my question will be, is it so necessary to move to python3.x
> ASAP? or Python2.7 will live for a while (2-3 years)?.

1.5 is still in use, so that is not exactly the issue.

I and many here recommend starting with current 3.x unless there is a 
compelling reason otherwise:
1. learning from a 2.7 book;
2. employer requires 2.7
3. using 2.x only module.  If you are determined to use gtk and are 
using the PyGTK bindings https://pypi.python.org/pypi/PyGTK/2.24.0
then you have no choice.

If you write 2.7 code, make it as 3.x-like as sensible.  Others may post 
some links.

If you use unicode, you might be happier with 3.x or even have to use it.

-- 
Terry Jan Reedy

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web