HackerTrans
TopNewTrendsCommentsPastAskShowJobs

ekiru

no profile record

comments

ekiru
·قبل 3 سنوات·discuss
In Argentina, by law, the candidates for all national elections for all parties are selected by las PASO (mandatory simultaneous open primaries), which are national simultaneous elections. I don't know if there are many other such countries, but there's one.
ekiru
·قبل 4 سنوات·discuss
I don't think that's what's happening. In your example with the generator expression, you're calling each lambda as you iterate through the generator, which due to the lazy evaluation of the generator means that the value of the single i variable shared across all each lambda is still only the latest value reached.

If you instead fully evaluate the generator expression before calling any of the functions (for example, by passing it to the list constructor), you get the same behavior as the list comprehension case:

    >>> [f() for f in list(lambda: i for i in range(0, 10))]
    [9, 9, 9, 9, 9, 9, 9, 9, 9, 9]
ekiru
·قبل 9 سنوات·discuss
That's fair.
ekiru
·قبل 9 سنوات·discuss
Why should the taxi union's decision to strike impose an obligation to strike on others who are not part of the union and had no input in the decision to strike?