0

python magic method __getattr__ lets one intercept calls to access attributes of objects. Is there an equivalent to do the same for class attributes?

IMO not a duplicate to intercept calls to undefined methods. class variables are different than methods. I want to intercept calls of pattern A.x where A is the class and 'x' is the attribute. –

Yogi Joshi
  • 786
  • 1
  • 6
  • 19

0 Answers0