3 ms·
This isn't a "gotcha". This is using the wrong function. "rstrip" and "removesuffix" are simply not the same thing.
by LeoPanthera 3y ago
This isn't a "gotcha". This is using the wrong function. "rstrip" and "removesuffix" are simply not the same thing.
- duke_sam 3y agoAbsolutely, 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).