⬅︎ Back to Ugly one-liner to debug an object in Zope
You don't need the map in order to get what you want. You could do something like this:[pprint(x) for x in dir(o) if not x.endswith('__roles__')]The fun thing about list-comprehensions is that you can 'filter' and 'map' all in one shot.
Of course! Why didn't I think of that. It's just a bit strange to create something that is never assigned to something else. Thanks for the tip
Comment
You don't need the map in order to get what you want. You could do something like this:
[pprint(x) for x in dir(o) if not x.endswith('__roles__')]
The fun thing about list-comprehensions is that you can 'filter' and 'map' all in one shot.
Replies
Of course! Why didn't I think of that. It's just a bit strange to create something that is never assigned to something else. Thanks for the tip