• 0 Posts
  • 6 Comments
Joined 2 years ago
cake
Cake day: September 19th, 2023

help-circle




  • While I agree to some extent, if not var is more than clear enough for anyone that knows python. If that pattern confuses someone, they probably aren’t at level where they should be dealing with python at a professional level. The same way you would expect people to understand pointers and references before delving into C code.

    This sort of stuff is something I taught first year engineering student in their programming introductory course, it’s just how python is written.

    For what it’s worth, it’s sort of similar in Erlang/Elixir. If you want to check if a list is empty, checking the length of the list is discouraged. Instead you would use Enum.empty?().