Skip to content
New issue

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

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

Already on GitHub? # to your account

Add a "num1 ** num2" operator as a shortcut for pow(num1, num2) #27081

Closed
Runemoro opened this issue Aug 16, 2016 · 1 comment
Closed

Add a "num1 ** num2" operator as a shortcut for pow(num1, num2) #27081

Runemoro opened this issue Aug 16, 2016 · 1 comment

Comments

@Runemoro
Copy link

Runemoro commented Aug 16, 2016

Adding an exponentiation operator, like ** in python, would make code more readable and faster to type. The way it works right now, it's easier to type x * x * x (5 characters) instead of pow(x, 3) (8 characters).

Also, it makes more sense to use an operator rather than a function, since we usually use infinix notation with exponentiation, as well as addition, subtraction, multiplication and division (we write a + b, a * b, a ^ b instead of sum(a, b), product(a, b), pow(a, b)).

@zoechi
Copy link
Contributor

zoechi commented Aug 16, 2016

Dup of #1859

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

No branches or pull requests

3 participants