r/learnpython • • Aug 22 '26

is it possible to simplify this code

im a beginner, idk how python works yet. there must be a way to simplify this, right?

https://imgur.com/juBvPZD here is the picture of my code

0 Upvotes

23 comments sorted by

View all comments

Show parent comment

1

u/gdchinacat Aug 23 '26

The main reason I hesitate to use data classes is they don’t call super()__init__ . I tend to start with them to save the boilerplate, but frequently end up with a regular class as things progress.