I want to write something like this. But not with methode in the list, but with inverse Attribute in the list.
How can I get the name of all inverse attribute of a object, like IsDefinedBy of something?
And how can I call the inverse attribute from a list? My plan is I get the name of the Inverse attribute from list, like IsDefinedBy. And call it in this part:
forminmethods:
print(m(5))
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The first part how to get inverse attribute have thomas answered in my last post.
the second part how to call the inverse attribut. Man can do it with object.getattr(inverse_attribute_name)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to build a list for iterative try. The follows is a example code of methode list.
I want to write something like this. But not with methode in the list, but with inverse Attribute in the list.
How can I get the name of all inverse attribute of a object, like IsDefinedBy of something?
And how can I call the inverse attribute from a list? My plan is I get the name of the Inverse attribute from list, like IsDefinedBy. And call it in this part:
The first part how to get inverse attribute have thomas answered in my last post.
the second part how to call the inverse attribut. Man can do it with object.getattr(inverse_attribute_name)
Have a look at
getattr(obj, name, default)
oroperator.attrgetter