Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Single and Double Underscore Naming Conventions in Python (Summary)

Now you know about some important Python naming conventions that rely on using the underscore character (_). You’ve learned how to differentiate between public and non-public names in Python code, write safe classes for subclassing purposes, and avoid name clashes in your classes.

In this video course, you’ve:

  • Learned a few Python naming conventions that rely on using underscores (_)
  • Differentiated public vs non-public names using a single leading underscore
  • Used double leading underscores to trigger name mangling in Python classes
  • Explored other common uses cases of underscores in Python names
Download

Course Slides (.pdf)

7.4 MB
Download

Sample Code (.zip)

4.7 KB

Become a Member to join the conversation.