Function name snake_case (ARCH2002)
هذا المحتوى غير متوفر بلغتك بعد.
Key python.naming.function-name-snakecase · Severity warning · Category naming
PEP-8 requires function and method names to use snake_case. camelCase or PascalCase function names deviate from the Python convention and hurt readability.
Incorrect
Section titled “Incorrect”def CalculateTotal(items): return sum(items)Correct
Section titled “Correct”def calculate_total(items): return sum(items)Rename functions and methods to snake_case (e.g. CalculateTotal → calculate_total).