3,901 karma · joined Oct 15, 2012 (14y ago) · 1,547 submissions
comment 11y ago · link · parent
comment 11y ago · link · parent
In other words, it's not something I expect you can read a couple sentences about and hope to understand well...
comment 11y ago · link · parent
The point was that writing something like
lambda item: item[0]
in your code is inferior to lambda (k, v): k
in terms of readability and comprehensibility. It is both longer and it also doesn't document the fact that the item is semantically a key-value pair.The problem is not (and has never been) whether something is "necessary" or "possible". Tuple unpacking obviously completely unnecessary to begin with, it has nothing to do with whether this is done in a parameter or not. The problem is whether the code is expressed better via unpacking.
comment 11y ago · link · parent
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.
comment 11y ago · link · parent
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.
comment 11y ago · link · parent
> 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:
comment 11y ago · link · parent
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.comment 11y ago · link · parent
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.
comment 11y ago · link · parent
comment 11y ago · link · parent
Oh really now? Consider yourself lucky.
"People on the OnePlus One forums have already created 300 pages in the CM12S bugs thread, comprised of more complaints than solutions. Which is why this time, people experiencing CyanogenMod 12S bugs on their OnePlus One might be better off either not installing the update, reverting to the KitKat version of finding a different custom ROM to use." [1]
[1] http://www.geeksnack.com/2015/05/09/oneplus-one-cm12s-bugs-a...
comment 11y ago · link · parent
comment 11y ago · link · parent
Really? Why is it that they can't even bring themselves to fix trivial bugs like [1] let alone bigger deal-breaker bugs like [2]? I find the OnePlus One borderline unusable with all the Cyanogenmod bugs it has...