Good audiodescribing of what you're teaching; very accessible for blind people (whose screen readers don't read the internal contents of videos); it helps us learn programming concepts and tricks as you go. Keep up the good work!
Thanks!
Missed opportunity to try and compare apples to oranges
To be clear init is rather an initialzer of a class instance. The self argument indicates that we passing an instance of the class, that already exists in memory, and we just set some attributes to it. Dunder new is actually responsible for instance creation
This is golden! Great job Tim!❤
You forgot my favourite one, the __call__ method. It allows you to treat your object as a function, basically if you have a class called Foo, and create an instance (foo = Foo()) you can the call it like so: foo(args).
I've been using Python, quite heavy for infra automation, since 2005 & have used Dunder methods before but had no clue this overall concept. Wonderful presentation style.
I love basic "under the hood" videos like this. I've tried to figure this stuff out by going into the standard library modules and reading the source code. Also by using dir() and looking at all the objects that exist. Hopefully more videos like this!
Tim:"So just to prove to you that I'm not crazy..."🤣🤣🤣Absolutely, I agree with you.😆😆😆
This is probably the most informative video I have ever encountered in my recommendations. Thank you for making it!
Excellent video. The concept that all operations are functions that take objects as arguments just opens up the language and syntax. I think I’m going to like Python considering how I prefer to learn, which is to achieve mastery, not perfection nor expecting success the first time.
great video never came across them till now, thanks
Oh this is huge I've learnt these at the basic level, but this is the perfect way to learn fully. I wasnt even sure what these were called, finding them on my front page was just lucky
11:16 in general, you’d expect addition to return an object of the same type, i.e. a new counter whose value attribute is the sum of the two value attributes of self and other. If implemented like shown here, directly returning the sum of the value attributes as an integer, addition won’t work with more than 2 terms. For example, a + b + c or sum([a, b, c]) will throw an error because the types aren’t compatible. Also, don’t forget to implement subtraction when working with number-like objects.
Like the other guy said– thanks for the great descriptive audio. I'm not blind, but as someone who likes this kind of content during downtime where staring at my phone may be annoying, it's really nice not having to look very often.
Wow, I didn't know Python had these arithmetic operator overloads, one of the coolest features I remember learning at university for C++. Now I can have my cake and eat it too because I love Python.
Great tutorial! Thanks ❤
Great overview and clearly presented in a manner that anyone should be able to digest. Wish it was longer and not as rushed in the second half. Based on my experience with other languages, I agree that understanding what is happening at a lower level and being able to use it effectively is key to being able to go from knowing a language to mastering it. Too many tutorials classify such concepts as being advanced when they are really quite fundamental.
Its technicly equivlent of operator overrides in c++
@TechWithTim