t229.py 82 B

1234
  1. class X: pass
  2. x = X()
  3. print getattr(x, 'wee', 14)
  4. print getattr(X, 'doggy', 'OK')