Skip to content

Using of private attributes (with double underscore) #137

Description

@dangusev

Hello!) Thanks for your efforts spent on this library).
I've got a question about the code inside. Right now I'm using python-saml library as a part of python-social-auth library. In my case I need to inherit python-saml classes in order to override some signature validation functions.
I dived into the code and found out that there are a lot of private variables like __errors, __request_data etc. If you want to access them in derived class you have to type self._MyBaseClass__request_data or self._MyBaseClass__errors because simple self.__errors is not working in this case.
The question: What's the reason?) Seriously, it makes overriding more complicated than it should be, I think.
Thanks for response!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions