Skip to content

Support attributes / attrgetter() #1

Description

@jvtm

In addition to itemgetter(), also support attrgetter(). For named tuples and other objects.

Minimum: user decides / instructs which mode to use.

Some kind of auto-selection is also possible (if mapping, use itemgetter, fallback to attrgetter).

https://docs.python.org/3.5/library/operator.html#operator.itemgetter
https://docs.python.org/3.5/library/operator.html#operator.attrgetter

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions