0

How to create child instance with a parent object

I've been messing around a bit in Python and I want to know how to create a child object from an instance of its parent. The child inherits all of its parent's atrributes, and adds new attributes to what it inherits. https://code.sololearn.com/cJvqSkXr0EIt/?ref=app

18th Jun 2020, 5:29 PM
Timothy Axel
Timothy Axel - avatar
2 ответов
+ 6
Timothy Axel here is a reference which may help you better https://www.python-course.eu/python3_inheritance.php
18th Jun 2020, 6:12 PM
BroFar
BroFar - avatar
0
Thanks for the reference. Though it didn't mention a specific way of creating child instances from parents, it did give me a few ideas on how to do it.
19th Jun 2020, 12:45 AM
Timothy Axel
Timothy Axel - avatar