6 comments

[ 3.3 ms ] story [ 35.4 ms ] thread
Developer uses the wrong api and goes :surprised_pikachu:
This isn't a "gotcha". This is using the wrong function. "rstrip" and "removesuffix" are simply not the same thing.
Absolutely, it’s possible the name could be misleading but surely this is one of those times where maybe you make the mistake once and then never again. There are far more painful gotchas in Python (see mutable args).