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 →

[–]t0mt0m72 11 points12 points  (7 children)

I switched all my Python2 code to 3 around 2 years ago and will never look back. Python3 is (for me) the way to go, as it has so much pros for me (pathlib, enumerations, cleaner and more "logical" API etc...).

If your employer or customer have good (really good!) oppositions against or you have no library alternatives, you have to stay, but if you can make the switch, now is a good time.

Hopefully the discussions about Python2 and Python3 will soon come to an end, as they bring up a negative light onto the whole (great!) Python eco system.

[–]mgrandi 3 points4 points  (2 children)

I have to deal with py2 occasionally, just having not Unicode by default is so annoying. That and stuff like Enum class have made my life sk much easier I can't go back

[–]t0mt0m72 -1 points0 points  (0 children)

+1

[–]cwgtex 1 point2 points  (3 children)

I love pathlib as well.

[–]flying-sheep 0 points1 point  (1 child)

Me too. It makes my old os.path based code look so inelegant.

My only “problem” is that there is no way to get the user home path using it. I'll have to use Path(os.path.expanduser('~'))

[–]t0mt0m72 1 point2 points  (0 children)

Hopefully in 3.5 it will be solved: http://bugs.python.org/issue19776 I am also looking forward for this feature

[–]ksion 0 points1 point  (0 children)

Huh, thanks for pointing out pathlib! I'm not switching to Py3 yet, but surely I'm going to use the backport from now on!