News for hackers. Stuff that matters.
Re:Python 3 in 2016 by libeclipse on Thursday February 18, 2016 @07:14AM (#11125197)
I started off python learning python 3, but a few months into it, I was forced do a project in python 2. It was a turning point, I immediately ported over all my python projects to python 2. To me, it just seemed more simple, elegant, and cleaner. It was the more pythonic version of python. And if I'm still working with python after 2020, I'll be using python 2.
Re:Python 3 in 2016 by hepta on Thursday February 18, 2016 @07:15AM (#11125200)
I don't understand this, what is more "pythonic" about 2?
Re:Python 3 in 2016 by hueving on Thursday February 18, 2016 @07:38AM (#11125302)
Not typing 'encode' or 'decode' when dealing with strings. I know it sounds stupid, but it's really distracting compared to everything else in python that just flows easily.
Re:Python 3 in 2016 by mkesper on Thursday February 18, 2016 @07:45AM (#11125334)
Then you're doing it wrong. Sorry but that's definitely better solved in Python3 than in 2. Always decode/encode when opening a file/stream/whatever and only use unicode internally.
Re:Python 3 in 2016 by Yaggo on Thursday February 18, 2016 @07:47AM (#11125338)
Sounds like you are shooting yourself in the foot. Your code may work with ASCII but will immediately break in non-naïve cases.