Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 661 Bytes

class-naming.md

File metadata and controls

27 lines (17 loc) · 661 Bytes

Python Naming Convention > Class Naming

PascalCase

  • Begin with an uppercase letter
  • Preferably a noun e.g. Car, Bird, MountainBike
  • Avoid acronyms and abbreviations
class Car:
    ...

Private Class

Python does not support privacy directly. This naming convention is used as a weak internal use indicator.

  • Should follow the above naming conventions
  • Should use a leading underscore (_) to distinguish between "public" and "private" classes
  • For more read the official python documentation.
class _Car: # private class