Learn Python OOP in under 20 Minutes

  Рет қаралды 147,467

Indently

Indently

Күн бұрын

Пікірлер: 121
@susieoneil5706
@susieoneil5706 3 ай бұрын
Actually camelCase starts with a lower case letter. Class names are in PascalCase,
@Indently
@Indently 3 ай бұрын
Upper Camel Case and PascalCase are synonyms. I didn't say "UpperCamelCase" but the idea is clear :)
@Obie.
@Obie. 3 ай бұрын
⁠@@Indentlyhey Federico! Your point is valid, but i don't think it was clear which is why he was trying to help. There is a clear distinction between camelCase and UpperCamelCase, and although he may not have been aware of this, I believe was just trying to help others not get confused.
@stevehageman6785
@stevehageman6785 3 ай бұрын
For decades Pascal case was: "PascalCase" and Camel Case was: "camelCase", but I noticed in the last few years the Python community has started saying that this is Camel Case: "PythonCamelCase". Since there is no ISO or ANSI standard on how things "Must" be named. It is what it is now, the Pythonistas have taken over. ;-)
@JelloTalks
@JelloTalks 3 ай бұрын
@@Indently Um no? Why would you even say "camel case" if not to mean "the first letter is capitalized"? Either use "Upper Case" or "Pascal Case", I've literally never heard "UpperCamelCase"
@GRAYgauss
@GRAYgauss 3 ай бұрын
@@Indently Holy cow, just say you were wrong tool - do not recommend this channel.
@SuperWombus
@SuperWombus 2 ай бұрын
5:39 Came here to finally understand the self reference and how it works, dozens of other explainer videos and random googles later my journey has ended. THANK YOU!!
@vacowboy75
@vacowboy75 5 күн бұрын
This contains the clearest explanation of self and what it is/does that I have seen on YT. Thank you!
@angelinaradovanov47
@angelinaradovanov47 Ай бұрын
Thank you for this video - I struggled so hard to understand classes but now I finally got it!!!
@BlazinLinux
@BlazinLinux 19 күн бұрын
I never could understand oop now I really feel like it clicked. Thanks for the life lesson.
@reginamndii
@reginamndii Ай бұрын
I was watching CS50-Python, OOP and I didnt understand anything. Was soooo confused. Now its all clicked. Thank you so much !
@divyakumar8147
@divyakumar8147 14 күн бұрын
thanks the video was just awesome learnt so much in just 18 minutes never thought could gain so much clarity about oop in python in such less span of time.
@HariWiguna
@HariWiguna Ай бұрын
You are a great teacher! Thank you for sharing these concise tutorials. I've learned a lot!
@dingdongkornik9521
@dingdongkornik9521 3 ай бұрын
learned the difference between repr and str dunder. thanks.
@gustavos3424
@gustavos3424 3 ай бұрын
do a video about when NOT to use classes, people love to create unnecessary classes
@jinyiliu2102
@jinyiliu2102 3 ай бұрын
can’t agree more
@vinesnts
@vinesnts 3 ай бұрын
You could do a part 2 where you explain inheritance and other OOP concepts applied in Python.
@alperen_101
@alperen_101 16 күн бұрын
I do not comment often but now I do. Because your way of teaching is impressed me. Thanks
@canewizard4141
@canewizard4141 3 ай бұрын
Primeira vez que eu vi uma explicação do que é "self" que eu entendi. Já vi vários vídeos sobre class e parece que os instrutores sempre tem preguiça de explicar e só dizem "a, tem que colocar isso aí, se preocupa não". Obrigado! 😁😁
@yoyoiziah
@yoyoiziah 3 ай бұрын
Your videos are amazing. Very well structured and clear, thank you!
@MrNess2911
@MrNess2911 3 ай бұрын
Helpful tutorial! Crystal clear. Please continue!
@kspen72
@kspen72 2 ай бұрын
Great tutorials on this channel. Python slinger since 90s and find your manner of explanation fabulous. Recommending you to those that ask for help. Keep up the great work and thanks for supporting the community!
@ferroalloys594
@ferroalloys594 2 ай бұрын
Classes are just TYPE's! That sums it all up in just 4 words... Simples (:-)
@Bmin12ty
@Bmin12ty 8 күн бұрын
10/10 explanation of POOP
@JosephAgwuh-p3b
@JosephAgwuh-p3b Ай бұрын
I enjoyed these class video.. enough said. To boost my class usage and confidence
@NedTrevor
@NedTrevor 3 ай бұрын
6th one, I have been following your tutorial, I love how you make it easy to learn classes for real
@twilightop
@twilightop 3 ай бұрын
This is very helpful, we need more like this!
@dr4k0nis
@dr4k0nis 3 ай бұрын
This topic should include a follow-up at least on class inheritance.
@Indently
@Indently 3 ай бұрын
Could definitely make video on that :)
@quitchiboo
@quitchiboo 3 ай бұрын
Why not jump right ahead and do a video on why composition is preferable to inheritance?
@samuelec
@samuelec 3 ай бұрын
@quitchiboo I guess because he already said all he knows about it "Python OOP in 20 minutes"
@KM_CM
@KM_CM 2 ай бұрын
9:15 Oh, so thats the script who whispered it! I thought thats my cat that learnt to talk, and I started praying to him already.
@ferggill9461
@ferggill9461 3 ай бұрын
Could you perhaps cover classes and GUI's, like PyQt6 or TK? How might one structure a class with widget connections and event handling? Thanks for the educational videos. Great work
@lowerclasswarfare
@lowerclasswarfare 3 ай бұрын
I've been playing with Tkinter recently and there's some very specific ways of handling the structure of a tkinter app, but once you get the hang of it, it gets easier. Just start looking up a couple tutorials to start with and then I'd try creating custom buttons, and using event binding to achieve better flexibility assigning other functions or actions instead of using "commands" which you'll learn about if you look those tutorials up.
@lowerclasswarfare
@lowerclasswarfare 3 ай бұрын
For instance I replicated a push button that changes on click and on release and also plays a sound. I got the idea from a popular online soundboard website. If you use PIL you can work with PNG images easier, but turns out tkinter does not handle alpha values easily, so you need to do some hex to rgba conversions to match image background to root window background.
@lowerclasswarfare
@lowerclasswarfare 3 ай бұрын
Idk if that helps you but tkinter is kinda fun once you just get started
@hamzahalli3500
@hamzahalli3500 2 ай бұрын
Great video, easy to understand 👍
@afiffarakhan4992
@afiffarakhan4992 2 ай бұрын
Man this is good, thank you very much!
@spacelem
@spacelem 2 ай бұрын
As a Red Dwarf fan, "smeg" is not a word I associate with microwaves!
@romaniannationalist9167
@romaniannationalist9167 Ай бұрын
It really helped me, thanks !
@AlirezaR5
@AlirezaR5 12 күн бұрын
That was incredible
@PHTM04
@PHTM04 3 ай бұрын
Basic and easy!
@amirabas8817
@amirabas8817 3 ай бұрын
Thanks ❤❤❤ So helpful 🎉🎉
@carry_boats
@carry_boats 3 ай бұрын
very educational, thx!
@akalrove4834
@akalrove4834 26 күн бұрын
I wish you'd toched upon access modifiers like private/public in Python and what conventions are used for these.
@DrDeuteron
@DrDeuteron 16 сағат бұрын
the convention is a leading underscore, _foo, is private, and all that means is that clients should not use it nor rely on it. and then there is name-mangling (double leading underscore), that merges the instance name a class name so it cannot be accessed by subclasses.
@huseynxayyati2355
@huseynxayyati2355 3 ай бұрын
Great videos with clear expectations thank, please explain classmethods and decorators .
@DrDeuteron
@DrDeuteron 16 сағат бұрын
@foo def bar()... is syntactic sugar for: def bar()... bar = foo(bar) class method changes the default arg "self" to "type(self)" or "self dot dunder class".
@wahwahwally1
@wahwahwally1 3 ай бұрын
nice one!
@abdulrahmanbadran6713
@abdulrahmanbadran6713 7 күн бұрын
Is there a VS code extension that writes "brand:" and "power_rating:" in lines 7 and 12 at 5:55 for python ?
@jeffreyndukwe3869
@jeffreyndukwe3869 3 ай бұрын
Nice tutorial
@devderole
@devderole 22 сағат бұрын
Thanks!
@Skubidi-qy8hb
@Skubidi-qy8hb 3 ай бұрын
Great video !!! i was learning basics then got confused about OOP but this video cleared my confusion out.
@skywalker0823
@skywalker0823 2 ай бұрын
good and clear
@Jblanco1989
@Jblanco1989 2 ай бұрын
Very helpful
@dhilip77
@dhilip77 3 ай бұрын
I would like to understand Inversion of control or Dependency injection from python
@xanarycut
@xanarycut 14 күн бұрын
4:07 how did he Highlight Brand: and Powerrating: in Grey?
@BonesFrielinghaus
@BonesFrielinghaus 2 ай бұрын
I REALLY like the way you explain EVERYTHING! Soooo many videos leave stuff out, that should be explained!!!
@channelShutter005
@channelShutter005 9 күн бұрын
@Indently • PascalCase: Commonly used for class names in Python (PEP 8) and in languages like C# and Java. • camelCase: Commonly used for variable and function names in JavaScript, Java, and other languages (though snake_case is preferred for variables and functions in Python)... In the first line of video, you said that in Python we use camelcCase which is wrong..
@mreddy7356
@mreddy7356 2 ай бұрын
excellent
@playgoods
@playgoods Ай бұрын
thank you
@eeshtarr
@eeshtarr 3 ай бұрын
You sometimes do not clearly differentiate between the class and the instance. You say 'class' a few times when you meant 'instance'
@EUJokerBR
@EUJokerBR 3 ай бұрын
I think this is a good point, since you can create class variables that are the same in every instance of the class. For anyone learning it's pretty simple to make the mistake of using a class variable think it works the same as an instance one
@neebftw
@neebftw Ай бұрын
Do you have video about type annotation? Use it or not what is benefit pls
@Indently
@Indently Ай бұрын
Yeah, if you search for Indently type annotations a lot of videos should show up!
@neebftw
@neebftw Ай бұрын
@@Indently thanks for the video’s! 🤗
@Luca-lz4io
@Luca-lz4io 2 ай бұрын
love from brazil
@apeared9491
@apeared9491 2 ай бұрын
do a video about super and inheritance. I am struggling and i understand what you are saying
@LoL-hv6px
@LoL-hv6px 2 ай бұрын
All youtube tutorials sticks on either Car or Animal example
@dimmudimmu8512
@dimmudimmu8512 3 ай бұрын
Coming from c, what do i need to unlearn to understand python
@VrishabhBansod
@VrishabhBansod 3 ай бұрын
What about all OPP pillars like Inheritance, Polymorphism etc.
@Anat20081
@Anat20081 3 ай бұрын
Is the infromtaion (like brand, power_rating) private like in C#? Do you also need to have get and set methods for the information to use it outside the class?
@quitchiboo
@quitchiboo 3 ай бұрын
Python doesnt really have a concept of private/public attributes. You can use hints, but they are not enforced. Getters and setters are not necessary, but afaik they are not mandatory in any language, it's just recommended in OOP for various reasons.
@DrDeuteron
@DrDeuteron 3 ай бұрын
Python should never have get and set methods, ever, for attributes. Rather, use the property() decorator.
@yungc0c0_
@yungc0c0_ 3 ай бұрын
Can you do one of these for NumPy?
@slimestaff1
@slimestaff1 2 ай бұрын
Can you make a dunder method? Or you can only use the ones that python gives you?
@yeloSolo
@yeloSolo Ай бұрын
you killed 7 of my brain cells by calling a non camel case a camelCase.
@KumR
@KumR 3 ай бұрын
Beautiful... BTW when thou said Initializer ... thou meant constructor ? And how do we know what return type to give functions ? like when to use None and when to use "Str".
@DrDeuteron
@DrDeuteron 3 ай бұрын
Init and str are strongly typed, you can’t return anything else. The actual constructor is dunder new. Dunder Init is indeed an initializer.
@rainy20202
@rainy20202 2 ай бұрын
8:58 so why do we return None on these functions?
@SirusStarTV
@SirusStarTV 2 ай бұрын
It's like "void" in c/c++, it doesn't return anything.
@erkakb
@erkakb 3 ай бұрын
4:07 ? how come the instantiation works here? here it seems attributes are somehow set by : (colon) operator but not the = (equal sign) operator In Python, when you instantiate an object, you use the = operator to assign the object to a variable, and the arguments inside the parentheses should be in the form of key=value, not key: value. How does the compiler accept this notation?? edit: time stamp added to question.
@SirusStarTV
@SirusStarTV 2 ай бұрын
You see that they're grayed out, right? It's code editor feature that shows the names of arguments for convenience.
@erkakb
@erkakb Ай бұрын
@@SirusStarTV A-ha! So, the grayed-out bits are NOT really typed or involved here in 4:07 code BUT just shown but shown by the editor. Do I get it right?
@Matt-lf1ik
@Matt-lf1ik 8 күн бұрын
What font is this?
@harshjain2171
@harshjain2171 3 ай бұрын
First one
@kanishkashami
@kanishkashami 3 ай бұрын
Do decorators next
@arungumpina4644
@arungumpina4644 2 ай бұрын
Also what does '...' (3 dots) in class def means? what happens if given like that?
@SirusStarTV
@SirusStarTV 2 ай бұрын
If you want to quickly make a class or method that doesn't contain any implementation you put three dots ...
@kadircalloglu2848
@kadircalloglu2848 3 ай бұрын
If I were you, I would use enums in the power rating section.
@codingmonkey34
@codingmonkey34 3 күн бұрын
Oh man, i am new to coding and let me tell you, i have no clue what i typed when i was trying to copy what Indently did at the start with the initialisers... also i missed a space after def so the whole code failed at first hahaha
@shiva_1947
@shiva_1947 3 ай бұрын
😍😍😍😍
@johnmoff9324
@johnmoff9324 3 ай бұрын
What editor is this?
@AriteZastrow
@AriteZastrow 3 ай бұрын
I guess it's PyCharm 🤓
@MewingStreak31
@MewingStreak31 2 ай бұрын
inheritance isnt oop now?
@poopilydoopily7784
@poopilydoopily7784 2 ай бұрын
microwaved smegma
@sorenschultz1144
@sorenschultz1144 3 ай бұрын
Let's be honest, python object oriented programming is POOP
@jerryhall5709
@jerryhall5709 Ай бұрын
Does that mean I have to flush the objects to save memory?
@sorenschultz1144
@sorenschultz1144 Ай бұрын
@@jerryhall5709 😭😭😭💀💀💀
@joanlapeyra
@joanlapeyra Күн бұрын
In the UK __init__ does not work. You have to type __innit__.
@BunrithViwatthanak
@BunrithViwatthanak Ай бұрын
I can do this in Rust, C++, and Zig 🗿
@deequi77
@deequi77 3 ай бұрын
3rd one
@schwartzenheimer1
@schwartzenheimer1 Ай бұрын
Very instructive, but you've clearly never used a microwave...
@kaydenpeterson6749
@kaydenpeterson6749 18 күн бұрын
XD Learn how to make A microwave . Thank you
@FF-ms6wq
@FF-ms6wq 11 күн бұрын
Pretty poor explanations. Do better!
@secrontory1346
@secrontory1346 3 ай бұрын
7th
@mamuli01
@mamuli01 2 ай бұрын
This Video is Sponsored by SMEG.
@SirusStarTV
@SirusStarTV 2 ай бұрын
MA
@leFrederic
@leFrederic Ай бұрын
I think you did too much in one video.. Everything from 11:50 onward about dunder methods could have been saved for another video with more detailed explanations.
@HungryBen-d7y
@HungryBen-d7y 3 ай бұрын
5th
@thanhdanhthai4484
@thanhdanhthai4484 17 күн бұрын
Maybe cốt lõi là bik chắt lọc
@striderdubz8440
@striderdubz8440 Ай бұрын
Smeg
@thanhdanhthai4484
@thanhdanhthai4484 17 күн бұрын
50 Cent
@Hopetobebetter
@Hopetobebetter Ай бұрын
too simple.
@huseynxayyati2355
@huseynxayyati2355 3 ай бұрын
Great videos with clear expectations thank, please explain classmethods and decorators .
Let's Build 10 Python Projects
1:50
Indently
Рет қаралды 15 М.
5 Good Python Habits
17:35
Indently
Рет қаралды 663 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
The Amazing Future of Blender!
9:32
askNK
Рет қаралды 11 М.
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 381 М.
The True Power of "ChainMap" in Python
13:04
Indently
Рет қаралды 15 М.
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Python Programming ROADMAP :How to Become a PYTHON Developer (2024)
5:41
Tisfoulla Academy
Рет қаралды 12 М.
How To Write Better Functions In Python
14:17
Indently
Рет қаралды 53 М.
10 Nooby Mistakes Devs Often Make In Python
24:31
Indently
Рет қаралды 69 М.
All 39 Python Keywords Explained
34:08
Indently
Рет қаралды 217 М.
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 337 М.
How To Actually Achieve Your Goals in 2025 (Evidence-Based)
15:15
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН