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

1

u/Adorable-Strangerx Oct 06 '26 edited Oct 07 '26

Or a dict. Every data structure can be dict if you are brave enough...

Edit: since people didn't get the joke. Use (data)classes. Data types are there for a reason

1

u/Capable-Package6835 Oct 07 '26

I agree. For many tasks, dict is sufficient if all you need to do is storing a set of properties or attributes. I'd say that class methods are stronger argument for using classes.

1

u/tom-mart Oct 07 '26

Sure, if it works for you. I would still see it as a class so you can have a fields autopopulate on creation or to utilise class functions. But you do you.

1

u/Adorable-Strangerx Oct 07 '26

It was a joke bro. I have seen too many "dicts where should be (data)class" that I have nightmares

1

u/tom-mart Oct 07 '26

Faur enough, dict would still be a far better option than string variable that OP is using in this case.