I wonder how the setter and deleter decorators actually _work_, under the hood? I can see that @property is a built-in function that can be used as a decorator. It exists out there, somewhere. But @loc.setter? I suppose that's some callable on the object named loc... But interesting to my little Python brain that it can just refer to `loc` as `loc` , rather than something weird like `self.loc` :\ Anyone got an answer on how it works under the hood, before I go to the docs? :)
the `property` decorator returns an object which itself has a `setter` attribute that is also a decorator! written out it'd be like: ``` def _f(self): ... # renamed for clarity f = property(_f) def _f(self, x): .. # renamed for clarity f = f.setter(_f) ``` see also ruclips.net/video/WDMr6WolKUM/видео.html
Nice video ! I tried keeping up with the concepts explained, which I could untill you used @MyProperty, which I didn't quite understand : what does @ do ?
You are a great teacher :)
Clear, concise ! Nice one 👍
thanks so much explained very well!!
I wonder how the setter and deleter decorators actually _work_, under the hood? I can see that @property is a built-in function that can be used as a decorator. It exists out there, somewhere. But @loc.setter? I suppose that's some callable on the object named loc... But interesting to my little Python brain that it can just refer to `loc` as `loc` , rather than something weird like `self.loc` :\ Anyone got an answer on how it works under the hood, before I go to the docs? :)
the `property` decorator returns an object which itself has a `setter` attribute that is also a decorator!
written out it'd be like:
```
def _f(self): ... # renamed for clarity
f = property(_f)
def _f(self, x): .. # renamed for clarity
f = f.setter(_f)
```
see also ruclips.net/video/WDMr6WolKUM/видео.html
waiting for descriptor videos
Nice video ! I tried keeping up with the concepts explained, which I could untill you used @MyProperty, which I didn't quite understand : what does @ do ?
really nice video ! the music in background is not to loud and your voice as well ! only problem is you should explain a bit more sometimes
yep didn't cover that in this video because it's covered in the one linked in the description! ruclips.net/video/WDMr6WolKUM/видео.html
Perfect
wow