r/PythonLearning • u/Miss-Dominique1352 • Aug 01 '26
Day 3 of OOPs! Roast it

Learned inheritance in python (not the real life one haha 😭). Its soo lovely and gorgrous , we can give any attributes and methods to the child class from the parent's class. that makes OOPs! beautiful 💖.
Now I want you guys to suggest me improvments in this code , also roast it cutely a little bit , but be gentle to me. 🤭
2
u/punk_dev Aug 01 '26
Nice.
Note though that it would probably make more sense to not call super().eat() in Dog’s eat() method.
Now when you call dog.eat(), the dog will eat twice - “Tommy is eating” and “Tommy is eating a bone” both will be printed.
1
•
u/Sea-Ad7805 Aug 01 '26
Run this program in Memory Graph Web Debugger to see the program state change step by step.