r/PythonLearning • • Oct 06 '26

Discussion Why writing classes feels boring?

I don't know but i feel classes are unnecessary work to be added in projects. I have learnt it 2 months ago..

After that I never used it for any of my projects.

0 Upvotes

43 comments sorted by

View all comments

Show parent comments

2

u/tom-mart Oct 06 '26

How did you define the task? That's an obvious object needing a class.

1

u/ProgramBrave718 Oct 06 '26

The task is taken by user input

5

u/tom-mart Oct 06 '26 edited Oct 06 '26

That's not an answer to my question. How is the task represented in your code?

If I wrote a task manager i would start with a Task class. Task has a lot of properties that are worth storing, like category (string), deadline (datetime) task_detail (string), status (string), reminders (List), and many, many more.

How the task is created is different story. You can take user input and save it to task.task_detail. So should the deadline be saved to task.deadline and so on.

So how is taks represented in your code? I bet it's a string variable, isn't it?

1

u/ProgramBrave718 Oct 07 '26

That kind of task should be represented by classes but actually my code takes only string for task

→ More replies (0)