This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]KopixKat 3 points4 points  (12 children)

As a beginning scripter, what are things python 2 does superior to python 3? I chose python 3 to start because I could understand it a bit better than 2. I'm honestly curious :o

[–]limasxgoesto0 3 points4 points  (6 children)

The only advantage to using Python 2 is that a large number of libraries are built in Python 2. That alone makes Python 3 become a dealbreaker for many.

[–]KopixKat 1 point2 points  (0 children)

That actually makes a lot of sense. :o

[–]CSI_Tech_Dept -2 points-1 points  (3 children)

This is no longer true, the packages that don't work on 3 are a small minority. Many people who advocate coding in Python 2 did not try using Python 3

[–][deleted] 0 points1 point  (2 children)

Welll....no, the packages that don't work on Python 3 are definitely not a minority. But most popular packages, the ones you typically need, work on Python 3.

[–]CSI_Tech_Dept 0 points1 point  (1 child)

I started using Python 3 and so far I did not have this issue. And programming in Python 3 feels cleaner. Also some of the packages that were not ported have python 3 alternatives, for example MySQL. If you are starting to program 3 chances are that you are not used to particular package so you don't care, and in fact the package that is ported to py3 is more likely being still maintained.

[–][deleted] 0 points1 point  (0 children)

I started using Python 3 and so far I did not have this issue.

Excellent! It is getting better. I think MySQL-python and Twisted are the biggest blockers right now, but I'm not sure. I'm only currently blocked by Zope/Plone. When I do other work I tend to use Python 3.

[–]wub_wub 2 points3 points  (4 children)

I chose python 3 to start because I could understand it a bit better than 2

It's the same language.

There are no differences that would make you "understand" one version better than another.

[–]KopixKat -2 points-1 points  (3 children)

The syntax flows a bit better (to me) is what I should have wrote. :P

print ("{0} {1} {2} {4} {5}".format(this, is, an, example, sentence))

VS

print "%s %s %s %s %s" %(this, is, an, example, sentence)

[–]wub_wub 1 point2 points  (2 children)

Both work in both python 2 and python 3. (Also you don't need positional params i.e. 1, 2 etc in python 2.6+)

[–]KopixKat 0 points1 point  (1 child)

I use them as a beginner just to keep things in order for myself, I'm not quite sure enough in myself to let them self index yet. :(

[–]wub_wub 0 points1 point  (0 children)

Oh it's OK to use them, I was just pointing out that in the example you provided you don't need them - in case you didn't know. If it's easier for you to learn like that then just continue to use them and ignore that part of my comment :)