Dude. That was absolutely beautiful. Like actually perfect. Have seen so many coding videos online but this is BY FAR the best, in terms of density, understandability, elegance. Hopefully you upload more. As of right now, this is my favorite coding video on all of yt. Gonna watch all of your python videos, even the ones covering topic I already know.
This series is the most comprehensive, cohesive, and helpful python resource I have ever found for my students. You are a gifted educator, please keep producing this series. You will be successful. I will help you in any way I can, feel free to reach out.
I am almost sure this is the best content in all TH-cam about property decorator and getters and setters....I have seen the class with example of circle so many times before....none of them discussed important issues that you did...the last part of video that you made area change anytime radius changed was elegant and beautiful, more than most videos that are supposed to be killer design patterns
That interesting thing at 4:44 is surprising, from what we've learned about how Python looks in the instance dictionary before looking at the class dictionary. If we've got a _radius @property in the class, and a _radius attribute on our instance (say it's assigned to the string "hello")... I see that _radius is then present in the `intance.__dict__` or `vars(instance)`. But `type(instance._radius)` would in this case be `int`, rather than `str` ("hello"). What's the machinery that's making this happen?
"Fluent Python" is the only text book I've read. I'm not a Python programmer, I'm just relearning Python with my knowledge in other programming languages. I try to focus more on the thought process involved when using a feature provided by the language. Talks by "James Powell" are very good to get an idea of why something is the way it is in Python.
The convention is to use single underscore prefix to tell other programmers something is private and intended only for use within the class (not truly private). Double underscore prefix has special meaning for the interpreter and the interpreter does name mangling to make the variable "almost really" private. Most of the Python programmers still seem to follow the single underscore prefix. That's why I chose to go with that.
@@zeinabezz1426 if you use double underscore (self.__attribute=value) with an attribute Python interpreter will put a name of a class before this attribute every time you use it, like this -> _classname__attribute. It helps to avoid attributes name collision.
In 9:25, Respecting the definition of decorator: it takes a function and return another function However, @property returns an attribute (_radius) not a function
Dude. That was absolutely beautiful. Like actually perfect.
Have seen so many coding videos online but this is BY FAR the best, in terms of density, understandability, elegance.
Hopefully you upload more. As of right now, this is my favorite coding video on all of yt.
Gonna watch all of your python videos, even the ones covering topic I already know.
This series is the most comprehensive, cohesive, and helpful python resource I have ever found for my students.
You are a gifted educator, please keep producing this series.
You will be successful. I will help you in any way I can, feel free to reach out.
I am almost sure this is the best content in all TH-cam about property decorator and getters and setters....I have seen the class with example of circle so many times before....none of them discussed important issues that you did...the last part of video that you made area change anytime radius changed was elegant and beautiful, more than most videos that are supposed to be killer design patterns
the best explanation on decorators in youtube
Your explanation is amazing. Thanks for all the time you spend on these tutorial.❤❤
Great, powerful and amazing .. thank you
Thanks so much sir, excellent videos, I love it so much, so helpfulaand comprehensive 👍👍👍💖
Amazing content, will keep follow and wait for you to become big, thanks!
Grateful for the lesson. Love these with visual represetation like this.
Please do more of these series, thumbs up
Love your work
Would you please make a video on python descriptors and how the property method works
Sure. I'm planning to cover it as part of this series
@@sreekanthpr can you pls explain how return multiple values work's in python .
Great content! Thank you for these excellent videos!
hi Sreekanth, , because the property doesn't work if I define public attributes in the class, and try to manipulate them through property. Thnks
can we use the @cached_property to cache the result without computing?
very helpful and thank you for putting this together, I have a request, can you do this for generators and yield in python. thank you
That interesting thing at 4:44 is surprising, from what we've learned about how Python looks in the instance dictionary before looking at the class dictionary. If we've got a _radius @property in the class, and a _radius attribute on our instance (say it's assigned to the string "hello")...
I see that _radius is then present in the `intance.__dict__` or `vars(instance)`. But `type(instance._radius)` would in this case be `int`, rather than `str` ("hello"). What's the machinery that's making this happen?
MRO
Could you please recommend to me a good book reference
"Fluent Python" is the only text book I've read. I'm not a Python programmer, I'm just relearning Python with my knowledge in other programming languages. I try to focus more on the thought process involved when using a feature provided by the language. Talks by "James Powell" are very good to get an idea of why something is the way it is in Python.
@@sreekanthpr many thanks
Why you use _raduis instead of __radius to represent private attributes
The convention is to use single underscore prefix to tell other programmers something is private and intended only for use within the class (not truly private). Double underscore prefix has special meaning for the interpreter and the interpreter does name mangling to make the variable "almost really" private. Most of the Python programmers still seem to follow the single underscore prefix. That's why I chose to go with that.
@@sreekanthpr what is the other use of double underscore? Is there is a way for making a protected attribute?
@@zeinabezz1426 if you use double underscore (self.__attribute=value) with an attribute Python interpreter will put a name of a class before this attribute every time you use it, like this -> _classname__attribute. It helps to avoid attributes name collision.
I'm really happy tobe the first comment ☺️
How do you make these animations
I use github.com/ManimCommunity/manim
In 9:25,
Respecting the definition of decorator: it takes a function and return another function
However, @property returns an attribute (_radius) not a function
Which voice do you use for the reading? It really sounds almost like a natural human reading voice.
Microsoft one note >> View >> Immersive Reader
@@sreekanthpr Thanks.
ow man this is diffıcult :/