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

Add unary plus for operator function (+) when passing 1 argument #665

Open
geezmolycos opened this issue Jul 4, 2022 · 0 comments
Open
Labels

Comments

@geezmolycos
Copy link

Python document says there is unary plus operator in python. It's equivalent to operator.pos, and it's function can be overrided by implementing magic method __pos__.

While it's hard to find any real usage of unary plus operator, making (+) accept both 1 and 2 arguments is symmetric to (-), which can be operator.neg with 1 argument or operator.sub with 2 arguments.

@evhub evhub added the feature label Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants