def attr(cls, iterable, attr_name):
    """
    Applies #getattr() on all elements of *iterable*.
    """

    return cls(getattr(x, attr_name) for x in iterable)
def attr ( cls , iterable , attr_name ) : return cls ( getattr ( x , attr_name ) for x in iterable )
Applies #getattr() on all elements of *iterable*.