Re:The PEPs of Python 3.9
by pansa2 on Thursday May 28, 2020 @07:12PM
(#23344188)
> String.upper(msg)
That was the original syntax [0], before the string functions became methods. I agree that a method more strongly implies mutation than a function does.
Also, for consistency with list methods like `reverse` (which acts in place) and `reversed` (which makes a copy), shouldn’t the method be called `uppered`?!
That was the original syntax [0], before the string functions became methods. I agree that a method more strongly implies mutation than a function does.
Also, for consistency with list methods like `reverse` (which acts in place) and `reversed` (which makes a copy), shouldn’t the method be called `uppered`?!
[0] https://docs.python.org/2/library/string.html#deprecated-str...