Skip to content

a / b [terminology]

Terminology

Usage

  • Use for two symmetric arithmetic operands or two objects with equivalent roles.
  • They work well when the original parameter names are long and their roles become obvious from the operation.
  • Keep semantic names when the operands have distinct meanings throughout the function.
  • Avoid introducing a and b if doing so obscures an API concept such as dividend and divisor.
a, b = abs(numerator), abs(denominator)
int_part, rem = divmod(a, b)