1

Can anyone tell why this piece of code fails:

object.__setattr__(object(), 'non-existing-attribute', 200)

But this not:

class K(object):
    pass

object.__setattr__(K(), 'non-existing-attribute', 200)
martineau
  • 112,593
  • 23
  • 157
  • 280
Oded Badt
  • 253
  • 3
  • 10

0 Answers0