Skip to content

Make some ESME and SMSC methods a little less private. - #4

Open
nofeet wants to merge 1 commit into
praekelt:developfrom
nofeet:remove-name-mangling
Open

Make some ESME and SMSC methods a little less private.#4
nofeet wants to merge 1 commit into
praekelt:developfrom
nofeet:remove-name-mangling

Conversation

@nofeet

@nofeet nofeet commented Mar 17, 2014

Copy link
Copy Markdown

ESME and SMSC use name mangling to add extra privacy to some methods.
This makes them harder to subclass, which is frequently needed.
(e.g., see SMSC's constructor which needs ESME's receiver method)

This commit switches to single-underscore versions of all the
double-underscore methods. It keeps the old double-underscore
versions for backwards compatibility but adds a DeprecationWarning.

For some more thoughts on "name mangling":
https://stackoverflow.com/questions/7456807/python-name-mangling-when-in-doubt-do-what

ESME and SMSC use name mangling to add extra privacy to some methods.
This makes them harder to subclass, which is frequently needed.
(e.g., see SMSC's constructor which needs ESME's receiver method)

This commit switches to single-underscore versions of all the
double-underscore methods. It keeps the old double-underscore
versions for backwards compatibility but adds a DeprecationWarning.
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.

1 participant