News for hackers. Stuff that matters.
Re:Numpy: Plan for dropping Python 2.7 support by brians on Wednesday November 15, 2017 @05:29PM (#15708506)
The change to string handling justifies it for me. Writing `u’foo’` everywhere is a pain, and the rest of the 2.7 model is extraordinarily prone to runtime errors. With 3.6, I don’t have those problems.
Re:Numpy: Plan for dropping Python 2.7 support by pc2g4d on Wednesday November 15, 2017 @05:39PM (#15708610)
Yeah, I was pretty much sold on Python 3 when I stopped having to use the `codecs` module to read my files and when it would strictly enforce the separation between `bytes` and `str`, rather than having to manually track what sort of sequence I was dealing with.
Re:Numpy: Plan for dropping Python 2.7 support by dbcurtis on Wednesday November 15, 2017 @06:40PM (#15709095)
Yes, yes. My Python life is mostly about impelemnting odd protocols with Twisted. Will probably get serious about asyncio soon, but I have a lot of historical Twisted to deal with ATM.

I've noticed that the "Who cares about Python 3" types are not the people working on the kinds of problems I am. So my conclussion is that for many kinds of problems the benefits of Python 2 are kind of meh, so people stay in their comfort zone. For some kinds of problems, Python 3 is a huge, huge win over Python 2. Whether or not someone is a Python 3 advocate says more about the kinds of problems they work on than anything else.

Re:Numpy: Plan for dropping Python 2.7 support by dhon_ on Wednesday November 15, 2017 @08:38PM (#15709662)
How is the Twisted Py3 support coming along in practice? It looks like they are steadily ticking items off the todo list, but is it ready for production use yet?
Re:Numpy: Plan for dropping Python 2.7 support by dbcurtis on Wednesday November 15, 2017 @08:51PM (#15709723)
Everything I need is production worthy. That's obviously an idiosyncratic assessment.
Re:Numpy: Plan for dropping Python 2.7 support by kajecounterhack on Wednesday November 15, 2017 @06:16PM (#15708943)
+1

Just because we learned to work around unicode issues doesn't mean they're not completely bonkers in 2.7

Re:Numpy: Plan for dropping Python 2.7 support by vetinari on Wednesday November 15, 2017 @06:40PM (#15709093)
Most people didn't learn to work around unicode issues during the 2.7 time frame.

Many third party modules tended to explode spectacularly with encode/decode errors, when they were fed non-ascii strings, when used by people who write using all these funny characters.

Just the correct handling of strings in Python 3 alone is a hell of a reason to switch to it.

Re:Numpy: Plan for dropping Python 2.7 support by bonesss on Thursday November 16, 2017 @07:19AM (#15712096)
Let's not forget the joy of third party libraries that wouldn't fail, but rather silently convert, your data because they had hidden ascii asumptions...
Re:Numpy: Plan for dropping Python 2.7 support by __d on Wednesday November 15, 2017 @08:54PM (#15709734)
I have a contrary anecdote: for the sorts of work I do, having to distinguish between strings and bytes makes using Python3 more difficult, and more prone to errors.

I mostly deal with network protocols, lots of numeric content, and scarcely any non-English text.

But I appreciate other people have different needs.

Re:Numpy: Plan for dropping Python 2.7 support by joshuamorton on Thursday November 16, 2017 @12:27AM (#15710449)
I feel like the answer to this is "then use bytes everywhere". Why doesn't that work?
Re:Numpy: Plan for dropping Python 2.7 support by orf on Thursday November 16, 2017 @05:09AM (#15711499)
That's akin to saying:

> For the sorts of work I do, having to distinguish between lists and dictionaries makes using Python 3 more difficult and more prone to errors. I mostly deal with lists, and scaresely any dictionaries.

Just use bytes where appropriate.

Re:Numpy: Plan for dropping Python 2.7 support by fredley on Wednesday November 15, 2017 @05:41PM (#15708620)
Yes, and while performance on some tasks has gotten worse, on others it has got much better - JSON serialisation in particular, which was huge for us. Python 3.7 will be faster again in many areas.