Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace double-underscored names with single underscores #274

Merged
merged 1 commit into from
Aug 13, 2021

Conversation

akx
Copy link
Collaborator

@akx akx commented Jul 20, 2021

This will avoid Python's class-name-prefix mangling of attributes and methods while still retaining the signal that they're meant for private use of the library.

This makes it easier to e.g. subclass classes should one need to (e.g. as I needed in #212), and to access data from outside (while being mindful of the fact that you're accessing notionally private data).

Only one change to a test was required (and that test was indeed accessing a private field from outside and had to jump through hoops 😄 ).

This will avoid Python's class-name-prefix mangling of attributes and methods
while still retaining the signal that they're meant for private use of the library.

This makes it easier to e.g. subclass classes should one need to, and to access
data from outside (while being mindful of the fact that you're accessing notionally
private data).

Only one change to a test was required (and that test was indeed accessing a private
field from outside...).
@pitbulk
Copy link
Contributor

pitbulk commented Jul 22, 2021

WIll consider this change for a future release.

@pitbulk pitbulk merged commit f77d62e into SAML-Toolkits:master Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants