Successfully reported this slideshow.
Your SlideShare is downloading. ×

Descriptors

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 14 Ad

More Related Content

Recently uploaded (20)

Advertisement

Descriptors

  1. 1. .Honza Král @honzakral
  2. 2. __getattribute__
  3. 3. >>> a = B() >>> a.x AttributeError: No x here!
  4. 4. >>> a = B() >>> a.f() TypeError: f() missing 1 required  positional argument: 'self'
  5. 5. @property
  6. 6. super()
  7. 7. >>> b = B() >>> b.f(42, other=True) B.f(*(42,), **{'other': True} A.f(*(42,), **{'other': True}
  8. 8. ?

×