[Tutor] Private members?

kay Cee unee0x at gmail.com
Thu Feb 25 23:59:21 EST 2016

Say I have a basic Circle class, for example:

class Circle:
    def __init__(self, radius):
        self.__radius = radius 

Does adding the double underscore make this member directly inaccessible to children of the Circle class?

Also, I'd like to know if there are any side effects to programming classes this way?

Sent from my iPhone

More information about the Tutor mailing list