educative.io

Educative

If child cannot access private methods,

If child class cannot access private methods how are we accessing parents initializer

Python doesn’t enforce privacy like OOP languages. There is no existence of “private” variables/functions as such. However, a convention is followed that any name which starts with one or two underscores should be considered a private member. This is why __init__ is considered private but it can be accessed by the child class.