News for hackers. Stuff that matters.
Re:Functional Programming in Python [pdf] by m_mueller on Friday July 24, 2015 @10:43PM (#9946339)
Could you give an example?

Do you mean something like

> [ manager.name for manager in set([ person.manager for person in employees ])]

?

I assume with something like set() or unique() you need to create the intermediate iterable anyway, but without it I have trouble finding an example where doing a single list comprehension wouldn't suffice.

There are no comments on this comment yet.