News for hackers. Stuff that matters.
Re:Python 3.5.0 by lelandbatey on Sunday September 13, 2015 @05:21PM (#10212827)
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.

[0] - https://www.python.org/dev/peps/pep-3113/

Re:Python 3.5.0 by wfunction on Monday September 14, 2015 @03:31AM (#10213969)
> 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 by mycelium on Sunday September 13, 2015 @06:09PM (#10212960)
I use it like es6 or haskell destructuring. Sure it's a little weak compared to both those implementations, but the tuple case covers enough to be useful.
Re:Python 3.5.0 by pyre on Sunday September 13, 2015 @08:01PM (#10213173)
EC6 allows you to destructure in the function definition?
Re:Python 3.5.0 by mycelium on Sunday September 13, 2015 @11:58PM (#10213584)
Re:Python 3.5.0 by emidln on Monday September 14, 2015 @12:31AM (#10213644)
As someone who splits his time between Python, Clojure, and Javascript (via Babel), lack of this is extremely annoying for Python since the other two languages allow it.
Re:Python 3.5.0 by unoti on Sunday September 13, 2015 @06:07PM (#10212958)
A good example of a use case I can think of would be to pass an (x,y) coordinate pair as a single parameter, and unpack it in the parameter definition. This would save having an extra line that says (x,y) = pt.

Unless I'm missing something, I don't see this as a show stopper personally, and see it as increasing readability.

Re:Python 3.5.0 by jacobolus on Sunday September 13, 2015 @07:20PM (#10213106)
You should use a namedtuple for that sort of thing, and then refer to the members as pt.x and pt.y.