Avoid ternary statements, seriously.


May 16th, 2024


#writing #engineering

This is a personal preference informed by my experience. Using expanded statements can make code more readable and less prone to future coding errors. Some things to consider:

  • C++ in scripting contexts is okay.
  • Ternary statements in Python are acceptable and are encourged for readability.

This site is open source. Improve this page »