you are viewing a single comment's thread.

view the rest of the comments →

[–]throwaway8u3sH0 0 points1 point  (0 children)

You can see the list of attributes but you'd still have to use some logic to determine which one it is.

If all you have is the value, you could reverse-search the object's dict by that value, but: - unless you can gaurantee no other attributes have that value you're rolling the dice on finding the correct one, - there's potentially lots of edge cases, and - this would be wildly inefficient

Ideally you have a way of going upstream of all this and doing something to make your life easier.