Live data from Hacker News

Python 3.5.0

python.org

141–150 of 165 posts

Re: Python 3.5.0

#141
post #111

Earlier quoted context omitted.

I went to 3.3 a while ago but reverted back to 2.7 because out of the 10 or so crucial libraries I needed, one was still on 2.7. Bloomberg. ( http://www.bloomberglabs.com/api/libraries/ ). That's what the people who talk about high percentages of libraries already ported to 3, miss. All you need is a single one not to be ported and the future stays on hold. I have taken to using the 3 syntax in 2.7 so that I am prepa…

The GitHub repo suggests there's been Python 3 support for a while: https://github.com/filmackay/blpapi-py I've run into my fair share of Python 3 roadblocks, but you'd be surprised how far you can get by making a little noise and sending the occasional patch. Library authors are much more willing to prioritize Python 3 support if it looks like people actually need it :)

I will try to compile this today - appreciate that thank you. I understand that Ubuntu is making Python 3 the default from 16.04 onwards so I need to get moving. Looks like the long dusk for 2.x is finally turning to night.

Re: Python 3.5.0

#142

Earlier quoted context omitted.

> When I have to write code in 2.7 now, it feels like shifting from fifth gear down to second. You mean, second gear up to fifth? I tried writing some Python 3 code and the lack of parameter tuple unpacking by itself stunned me and drove me crazy, never mind other stuff. Python 3 seems very user-unfriendly compared to Python 2. Won't touch it with a ten foot pole unless my life depends on it.

At first glance, parameter tuple unpacking seems like a silly hack that was wisely removed, explained here http://legacy.python.org/dev/peps/pep-3113/ What are the cases where you use it / rely on it?

> What are the cases where you use it / rely on it?

Basically any time I need to unpack inside a lambda (e.g. functional programming) and have to use something like itertools.groupby(), I run into trouble with Python 3. For example:

  from itertools import groupby
  def groupby_unsorted(items, key):
    return map(lambda (g, l): (g, map(lambda (k, v): v, l)), groupby(sorted(map(lambda v: (key(v), v), items)), lambda (k, v): k))
  print(groupby_unsorted([1, 2, 3, 4], lambda v: v % 2))
Never ran into problems with it either.

Re: Python 3.5.0

#143

Earlier quoted context omitted.

> When I have to write code in 2.7 now, it feels like shifting from fifth gear down to second. You mean, second gear up to fifth? I tried writing some Python 3 code and the lack of parameter tuple unpacking by itself stunned me and drove me crazy, never mind other stuff. Python 3 seems very user-unfriendly compared to Python 2. Won't touch it with a ten foot pole unless my life depends on it.

As someone who's bounced back and forth between Python 2 and Python 3, I'm curious about your need of parameter tuple unpacking[0]. I've never encountered it, and after some research I don't understand the use case. I don't mean to sound like I'm trying to belittle your position, I would like to understand more. The PEP below doesn't seem to do a very good job explaining why people like them, and I'd like to hear a p…

> As someone who's bounced back and forth between Python 2 and Python 3, I'm curious about your need of parameter tuple unpacking[0]. I've never encountered it, and after some research I don't understand the use case.

> I don't mean to sound like I'm trying to belittle your position, I would like to understand more. The PEP below doesn't seem to do a very good job explaining why people like them, and I'd like to hear a proponents position on the feature.

Basically, I need it for functional programming. See here:

https://news.ycombinator.com/item?id=10213963

Re: Python 3.5.0

#144
post #99

Earlier quoted context omitted.

> When I have to write code in 2.7 now, it feels like shifting from fifth gear down to second. You mean, second gear up to fifth? I tried writing some Python 3 code and the lack of parameter tuple unpacking by itself stunned me and drove me crazy, never mind other stuff. Python 3 seems very user-unfriendly compared to Python 2. Won't touch it with a ten foot pole unless my life depends on it.

I've been using Python for 7+ years, and I had no idea parameter tuple unpacking was a thing. Never once seen any code that uses it, or seen anyone mention it. If you think the (rightful) removal of a hardly used feature[1] that has some big problems is a blocking issue then I feel sorry for you. Py3 is awesome. 1. https://www.python.org/dev/peps/pep-3113/

> If you think the (rightful) removal of a hardly used feature[1] that has some big problems is a blocking issue then I feel sorry for you.

Uh, thanks?

I would call it anything but "rightful". Making life harder for introspection tools is hardly a rightful reason for removing a core language feature. The code is what most developers are trying to develop, not the introspection tools.

Re: Python 3.5.0

#145
post #99

Earlier quoted context omitted.

I've been using Python for 7+ years, and I had no idea parameter tuple unpacking was a thing. Never once seen any code that uses it, or seen anyone mention it. If you think the (rightful) removal of a hardly used feature[1] that has some big problems is a blocking issue then I feel sorry for you. Py3 is awesome. 1. https://www.python.org/dev/peps/pep-3113/

> If you think the (rightful) removal of a hardly used feature[1] that has some big problems is a blocking issue then I feel sorry for you. Uh, thanks? I would call it anything but "rightful". Making life harder for introspection tools is hardly a rightful reason for removing a core language feature. The code is what most developers are trying to develop, not the introspection tools.

> Making life harder for introspection tools is hardly a rightful reason for removing a core language feature

Well that's one reason yes, and by itself not really a good enough one. But if you read the PEP there are another 4 good reasons that you omitted from your comment, why is that?

Re: Python 3.5.0

#146
post #145

Earlier quoted context omitted.

> If you think the (rightful) removal of a hardly used feature[1] that has some big problems is a blocking issue then I feel sorry for you. Uh, thanks? I would call it anything but "rightful". Making life harder for introspection tools is hardly a rightful reason for removing a core language feature. The code is what most developers are trying to develop, not the introspection tools.

> Making life harder for introspection tools is hardly a rightful reason for removing a core language feature Well that's one reason yes, and by itself not really a good enough one. But if you read the PEP there are another 4 good reasons that you omitted from your comment, why is that?

> Well that's one reason yes, and by itself not really a good enough one. But if you read the PEP there are another 4 good reasons that you omitted from your comment, why is that?

Because the other reasons were twice as horrible.

"No loss of abilities"? Uh, you can't do this in lambdas anymore.

"Exception to the rule"? Who cares? It was useful and readable, that's all that matters.

"Uninformative Error Messages"? This has never been a pain point for me. If you don't like it then no one forced you to use it...

"Little Usage"? Well I guess everyone matters but me. Which is fine, but then you shouldn't wonder why it would tick me off.

Re: Python 3.5.0

#147
Great! 134 comments so far and only 1 or 2 about "Python 3 will never prevail", "Python 2 is better" and the usual rant. Things are getting better !

Re: Python 3.5.0

#148

Earlier quoted context omitted.

At first glance, parameter tuple unpacking seems like a silly hack that was wisely removed, explained here http://legacy.python.org/dev/peps/pep-3113/ What are the cases where you use it / rely on it?

> What are the cases where you use it / rely on it? Basically any time I need to unpack inside a lambda (e.g. functional programming) and have to use something like itertools.groupby(), I run into trouble with Python 3. For example: from itertools import groupby def groupby_unsorted(items, key): return map(lambda (g, l): (g, map(lambda (k, v): v, l)), groupby(sorted(map(lambda v: (key(v), v), items)), lambda (k, v):…

But tuple unpacking inside lambdas is actually supported in Python 3, isn't it?

Re: Python 3.5.0

#149

Question - is there any web/api framework that leverages asyncio ? This implicitly also means first class DB/ORM support. Flask, sqlalchemy ,etc seem to be using gevent and py 2.7.

Tornado added support for that recently, I believe

Re: Python 3.5.0

#150

And yet, Python 2 usage is still strong while Python 3 adoption has actually slowed down , and at this rate, it will probably stop being used completely while Python 2 continues to live on: https://www.reddit.com/r/programming/comments/3k9yif/larry_w...

What's your point? You do have a point, right? Coming in to a thread about a python release and trying to stir up controversy? Or are you just doing it for kicks?

Trolls are trolls...
Post reply on HN