How do I override __getattr__ in Python without breaking the default behavior?
I want to override the __getattr__ method on a class to do something fancy but I don’t want to break the default behavior. What’s the correct way to do this? 3 Answers 3
I want to override the __getattr__ method on a class to do something fancy but I don’t want to break the default behavior. What’s the correct way to do this? 3 Answers 3
Imagine the following A type T has a field Company. When executing the following method it works perfectly: Type t = typeof(T); t.GetProperty(“Company”) Whith the following call I get null though Type t = typeof(T); t.GetProperty(“company”, BindingFlags.IgnoreCase) Anybody got an idea? 3 Answers 3