Upper-cases snake_case names while keeping the underscores: default_page_size → DEFAULT_PAGE_SIZE. In Python (PEP 8), Rust, C and shell scripts, module-level constants are written this way, while ordinary variables use lowercase snake_case.
Use it when values that started life as local variables or function arguments become fixed settings, or when you need environment variable names that match existing snake_case config keys.
String.Result; values on the right-hand side of each assignment are not modified.default_page_size = 20
max_upload_mb = 10
_cache_ttl_seconds = 300DEFAULT_PAGE_SIZE = 20
MAX_UPLOAD_MB = 10
_CACHE_TTL_SECONDS = 300All three names are upper-cased. _cache_ttl_seconds keeps its leading underscore, which in Python marks a module-private constant.
retry_after_2x → RETRY_AFTER_2X._cache_ttl_seconds → _CACHE_TTL_SECONDS.timeout) are not snake_case to this tool and remain lowercase.In a Python module, values like max_upload_mb = 10 scattered through functions can be lifted to the top of the file as MAX_UPLOAD_MB, which linters and readers recognise as constants.
If a YAML or TOML config uses database_url and log_level, the matching environment overrides are usually DATABASE_URL and LOG_LEVEL (pydantic-settings, for example, maps them this way).
timeout should be a constant too, write TIMEOUT yourself.get_user if they appear in the pasted code.No. The separators are identical, so the conversion is fully reversible with the opposite page, apart from words you edited.
__all__ changed?Names with two leading underscores are not matched by the snake_case pattern, which only allows a single optional leading underscore.