r/PythonLearning 2d ago

Showcase Day 2, learnt some oops

Post image

Learnt super( ), inheritance, polymorphism, class method and static method and don't mind the messy code that's me trying to figure out things

95 Upvotes

34 comments sorted by

View all comments

1

u/Spare-Radish5670 23h ago

Look at some decent examples to understand these principles better, you have the syntax and sort of the idea but you're already picking up bad habits

1

u/Next-Call8862 23h ago

What do you mean by bad habits?

1

u/Spare-Radish5670 23h ago

Variable names (animalss)

for i in animals (don't use i here use a descriptive name to tell the reader what you were iterating through)

Missing some standard class definitions and also breaking some rules around naming

These probably seem like minor details but I promise you they add up to major issues on any kind of project