T
T
Timebird2018-04-25 04:12:49
Python
Timebird, 2018-04-25 04:12:49

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.

Is this true? Can you give an example of tasks in which there is no way without classes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
l1l1l1, 2018-04-25
@Timebird

Why is OOP needed?
uni-vologda.ac.ru/oberon/infoart/plus&min.htm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question