r/learnpython • u/coreyschafer • Dec 20 '16
Python OOP Series
A six part series I put together on object-oriented programming in Python. I hope you find them useful:
360
Upvotes
r/learnpython • u/coreyschafer • Dec 20 '16
A six part series I put together on object-oriented programming in Python. I hope you find them useful:
1
u/bigfatbod Jan 11 '17
Brilliant stuff, thank you! I have one question regarding subclass init method of Manager and Developer. To pass in the parent attributes of name etc, you duplicate them. I find this a little strange. What if later on, you added in an attribute, say, date of birth? Without refactoring in your console, you'd have to go and also change every subclasses init methods too. Surely it would better to pass in a catch all like (self,parentargs,prog_lang) .... For the developer subclass. Or am I thinking too much?