+ 1
How to understand python class more deeply?I cant understand it.
I am a beginner . I spend a lot of time to learn python Already i have learned many parts of this language . But i am confused about class . Looks like its almost as same as modules . If a class is almost same lile modules than why need to build a class??? I dont know but i am very confused . Help me to understand class more deeply please ...
5 Réponses
+ 1
My suggestion is to start with a project.
Yeah, I think it is the only way get a proper hang of OOP. Python is mainly an OOP language. And you can never learn the proper structure of OOP without involving in a project. OOP isn't the thing to learn, it's kinda like a logical thing which needs to be understood properly. Once you get hang of OOP then nothing will be more fun than building objects or more specifically classes. It will feel like you can do anything with them. I think you can get it now. 😉
+ 3
yes, class and modules can be similar and as a beginner just don't mind for the technical difference.
Generally most languages have some code that might be useful in many cases and others just for your code.
The last one is a case for selfmade classes.
First one is a module candidate.
+ 2
modules are just python file which contains lots of classes and function which you can refer to, am a newbie too but i just take class just like we have classrooms and each students is a method with lots of different characters and what to do, if you want to call a student in a class you will have to use the class name, and don't forget methods are just same as functions, it just been called methods because they're inside a class, i hope this little one will help you understand the basic part of a class
0
Thanks Oma Falk ....
Your contribution will help me a lot to understand code more deeply .
0
Thanks for your time Asterisk ....Your reply will also help me a lot ...
Thanks again ....