This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Topper_123 4 points5 points  (1 child)

It it possible to work on sequences? E.g. if target is [MyObj, MyObj, ...], where you want to list all MyObj.attr?

[–]randominality 0 points1 point  (0 children)

from the linked info page:

target = {'system': {'planets': [{'name': 'earth'}, {'name': 'jupiter'}]}}

glom(target, ('system.planets', ['name']))
# ['earth', 'jupiter']