Python annoyances

From brainsik
Jump to navigation Jump to search

Stuff that annoys me in Python:

  • There is no way to reference all the arguments passed into a function. Sometimes I want to iterate over them but the only way to do that is if I collect them in a *args or **keywords which destroys the signature.
  • dict.setdefault() — never can remember what this does, just that it's not what i think it is
  • str.join(sequence) — i always expect the elements in sequence to get stringified