Answer the question
In order to leave comments, you need to log in
When should classes be used in Python?
I read examples and watched videos on using classes. All clear. But as soon as I start writing my scripts, the idea of using classes for some reason is generally swept aside, and I always do everything with functions. Maybe it's not bad? How do you know when to use classes and when to use functions?
For myself, I defined classes in python like this:
Classes should be used when there are a large number of attributes for different objects in the set.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question