Python 3's __init__(), self, Class and Instance Objects Explained Concisely

preview_player
Показать описание
Looking for a concise but thorough explanation of what Python 3's self means? What __init__() in classes does? What Class Objects and Instance Objects are and how they're related? This 8 minute tutorial covers all of these topics and provides a succinct explanation which'll be the only one you ever need!

This tutorial is best followed from start to finish as each point follows on logically from the last.
Рекомендации по теме
Комментарии
Автор

If you've found this useful in anyway, I'd really appreciate sharing it where you can so that more people can enjoy this resource! Watch out for a personal video I'm making on my own journey and how I changed career in my 30s from boring monotony to an exciting software engineering role. If ever you needed motivation or wanted my own specific advice on how to become a self-taught developer, then you make sure you don't miss it. Will be available next week!

LivePython
Автор

A good explanation that requires a basic grasp of object orientation. Do not expect to understand by passively watching instead of actively learning by experimenting with your own classes, using trial and error, and becoming frustrated when things go wrong as well as elated when they go right!

gt
Автор

3:48 - Thumbs up for "WOTS GOING ON ?"

ark
Автор

I concur with other comments in that, the way you explain is geared towards people with technical knowledge already, but those type of people are less likely to need to watch this video. The target audience isn't clearly defined. I think it's more useful to show us exactly why the init method is useful compared to just using normal definitions.

kougamishinya
Автор

I have to say, this video was incredible! I'm in uni, and I'm doing a class on data analytics and comp. modeling, we'reusing python and just started with OOP and we were introduced to classes and objects. It started out okay, but I quickly became confused when we started using __init__ and self, it became like a foreign language fast.

Your video got straight to the point, I didn't even know instantiated objects could have their OWN properties and methods, the idea that you just showed me of __init__ and self being used to deliver class attributes and methods to objects instantiated by that class clears almost ALL of my doubts.

Young programmers need more educational videos like this!

ArchanTulpule
Автор

I'm conflicted. On one hand, I'm happy you made this video, obviously bc I'm watching it, but on the other hand, it's not super helpful -- I think you need to take a step back and think about what you're actually saying and to whom you're speaking to b/c those who are watching this, may find it hard to follow, and the folks who could easily understand this content, aren't watching.

patrickjane
Автор

I gotta agree that although the content is obviously well articulated, I have trouble following it, as you don’t pause enough and it’s a bit robotic in its delivery. Good for those who know something about classes already maybe but not for noobs

shimmeringreflection
Автор

Simple and straightforward treatment of a somewhat confusing topic. I watched it about three times and now understand 100% of what you said. Off to start making my own classes. Thank you.

JDawg-oljh
Автор

It took me a few times of watching it but I finally wrapped my head around it. Just started 3 days ago and no previous machine language experience. Big thanks 👍🏼

joeyc
Автор

this video is a staple in how I know what self is, every time I come back to this video I have learned more.

Leshpngo
Автор

"how to draw an owl: first you draw two circles. Then, you draw the rest of the owl."

alpha_berchermuesli
Автор

Perfect pacing. I feel many other programming videos drag on a good bit but this video got straight to the point.

ziamkhan
Автор

You just confused me more lol
but the way u talk, keep up the good work

kerimmirzeyev
Автор

I'm sure this guy gets this all the time, but this is excellent. I'm taking a course that didn't explain this very well, but this patches some holes in my understanding.

appliedatoms
Автор

Very nice explanation of 'self'

I would add that each object (instance) has its own data, but all all instances are using the same methods code
and this is the reason that self needs to be passed to let the methods know on which data they should access/operate-on

ShukyPersky
Автор

This is a good explanation. Even though I was being the lazy student and didn't follow you writing my code, you cleared many little blackboxes left from other, more skippy explainations on classes.
_Init_, self, single-instance attributes... Now makes a lot of sense

sethheristal
Автор

@ ;-) Parentheses are curved ( ), brackets are square [ ], and braces are curly { }. Thanks for making! I learned some stuff!

gregorysomers
Автор

Single most concise video on the internet for starters!

simiiv
Автор

Nice video! The whole concept is fairly straight forward once you know the specific 'fancy terminology'. The most confusing thing to wrap your mind is all the i.e class variable, instance class, instance attributes, instance objects

mrboyban
Автор

it was hard to follow: in the dialog few words has repeated so much and it made the video, hard to follow plus the computer_like voice and the speed, low pauses and ....

multiforc