Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutate str methods? #297

Open
jimrybarski opened this issue Dec 14, 2023 · 1 comment
Open

Mutate str methods? #297

jimrybarski opened this issue Dec 14, 2023 · 1 comment

Comments

@jimrybarski
Copy link

jimrybarski commented Dec 14, 2023

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.

@boxed
Copy link
Owner

boxed commented Dec 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants