mutmut icon indicating copy to clipboard operation
mutmut copied to clipboard

Mutate str methods?

Open jimrybarski opened this issue 2 years ago • 1 comments

Is there any interest in adding support for mutating methods on str objects? For example, s.lower() would be mutated to s.upper(), or s.strip() would be mutated to s. Of course, not all methods have a clear mutation (e.g. str.maketrans()) but I think enough of them do that even partial coverage could be useful.

jimrybarski avatar Dec 14 '23 14:12 jimrybarski

Interesting idea. I guess the problem would be to know if it's a str at all, but maybe just mutating method names with a dict would be 99% of the way and would be easy to add configuration for to test more stuff.

boxed avatar Dec 14 '23 15:12 boxed