<!--
title: Purpose-indicating descriptive names
domain: ml-systems
topic: Naming Conventions
language: Python
source: huggingface/tokenizers
updated: 2020-10-13
url: https://awesomereviewers.com/reviewers/tokenizers-purpose-indicating-descriptive-names/
-->

Choose names for variables, methods, parameters, and fixtures that clearly communicate their purpose, content, and behavior. Names should be self-documenting and consider future code evolution.

For method names:
- Use action verbs that precisely describe the method's effect
- Prefer established patterns like `enable_xxx()`/`disable_xxx()` over ambiguous patterns like `with_xxx()`/`without_xxx()`

```python
# Less clear:
def with_padding(self, direction="right", ...):
    # ...

# More clear:
def enable_padding(self, direction="right", ...):
    # ...
```

For variables and parameters:
- Choose names that describe what the value represents rather than its implementation details
- Consider how names will work with future extensions

```python
# Less descriptive - unclear what these files contain:
@pytest.fixture(scope="session")
def precompiled_files(data_dir):
    # ...

# More descriptive - clearly indicates purpose and content:
@pytest.fixture(scope="session")
def serialized_files(data_dir):
    # ...
```

Maintain consistency in parameter naming across similar implementations to establish predictable patterns for API users.
