🤖Parameter Naming
Hypster provides sensible defaults for naming your variables to keep your code DRY (Don't Repeat Yourself), while also supporting explicit naming when needed.
Naming Methods
Explicit Naming
Use the name
parameter when you want full control over variable names:
Automatic Naming
Hypster automatically infers names from three contexts:
Variable Assignment
Dictionary Keys
Function/Class Keywords
Name Injection Process
Hypster uses Python's Abstract Syntax Tree (AST) to automatically inject parameter names:
Important Notes
Assignment Priority
Nested Naming
Warning: Avoid ambiguous assignments
Disabling Automatic Naming
Security Note: While name injection is designed to be safe, users with strict security requirements can disable it using
inject_names=False
.
Best Practices
Use Descriptive Variables
Consistent Naming
Explicit Names for Clarity
Last updated