⬅︎ Back to Ugly one-liner to debug an object in Zope
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
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.
Comment
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
Parent 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.