-
Notifications
You must be signed in to change notification settings - Fork 0
Methods
Vinicius Reif Biavatti edited this page Jul 25, 2022
·
1 revision
- Use a good representation name
- Use underscore to separate
- Use type hints
- Do not use camel case
- Do not use special symbols
- Instance methods should have their first parameter named 'self'.
- Class methods should have their first parameter named 'cls'
- Static methods don't need to have a default first parameter
- Do not use capital letters
✅ Do
class DataProcessor:
def process_data(self) -> None:
...
@classmethod
def create(cls) -> 'DataProcessor':
...
@staticmethod
def version() -> float:
...
- Home
- Structural Naming Conventions
- Format Conventions
- Code Naming Conventions
- Inheritance
- Access Modifiers
- Importation
- Functions and Methods
- Documentation
- Resources