Python "protected" attributes -


How can I get a private attribute of parent class from subclass (without making it public)?

<

  • _member is protected
  • __mail is private

Options if you control the original class

  • Make it secure instead of private because it looks like what you really want

If you do not control it

  • Use the

  • Undo Name Confused if You (Obs CTO) that Python that, you see something like _Class__member names are afraid "It does __ leading to" private. This is probably not considered as bad in Python.

  • Comments

    Popular posts from this blog

    python - Overriding the save method in Django ModelForm -

    html - CSS autoheight, but fit content to height of div -

    qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -