Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 2
In general programming, what is the actual purpose of classes? Wouldn't typical functions work just well?
8 Respostas
+ 6
ćļ¼Øļ¼”ļ¼°ļ¼°ļ¼¹ ļ¼“ļ¼Æ ļ¼Øļ¼„ļ¼¬ļ¼°ć
That way I learned OOP in python was like eating rice with fork
I hope to work with classes soon š
+ 5
Marco Polidori lol soup xD
Thanks man I will look up for it š
+ 5
ćļ¼Øļ¼”ļ¼°ļ¼°ļ¼¹ ļ¼“ļ¼Æ ļ¼Øļ¼„ļ¼¬ļ¼°ć
Yea to be comfortable with them I need practice
I have some books of python will reach oop soon š¤© and also The video Marco told about
Whenever I see any software source code the only thing I found is classes šš
+ 3
GODOFPC
as long as it is not like eatin soup with a fork š
+ 2
there is actually a very nice tutorial on youtube on oop in python by Corey Schafer if you are interested.
+ 1
classes are much better at describing attributes of objects that are reused often. in other words, writing a class that is called only once in your program can probably be better handled as a method/function.
if you have to the same things over and over, especially creating objects with the same attributes, classes will save you a lot of work.
that of course also applies if you write methods that shall be used by other coders.
a good example is UI programming. you might need 3 push buttons 5 fields etc. you donāt want to reinvent the wheel and plaster your code with repetitive stuff. instead, you call the button class from Qt and pass the features you want e.g.
hope this makes sense
0
classes are used to store data and methods, functions aren't
0
ćļ¼Øļ¼”ļ¼°ļ¼°ļ¼¹ ļ¼“ļ¼Æ ļ¼Øļ¼„ļ¼¬ļ¼°ć Yes, I've known Python for a while, but have never previously found a real use for classes. Lol