For getting all the defined class attributes I try to go with
TheClass.__dict__
but that also gives me the special attributes. Is there a way to get only the self-defined attributes or do I have to “clean” the dict myself?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Another solution:
I don’t think this is terribly robust and there might still be a better way.
This does adress some of the basic issues some of the other answers pointed at:
'name convention'based-filtering__len__is no problem (define in A).