Skip to content

Replace double-underscored names with single underscores#274

Merged
pitbulk merged 1 commit intoSAML-Toolkits:masterfrom
akx:de-secret
Aug 13, 2021
Merged

Replace double-underscored names with single underscores#274
pitbulk merged 1 commit intoSAML-Toolkits:masterfrom
akx:de-secret

Conversation

@akx
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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