Greg Ewing schrieb: > Might we want to add an in-place version of the 3-arg > pow() function one day? If so, leaving the third argument > there could be useful. "Martin v. Löwis" martin at v.loewis.de replied: > What could the syntax for that be? > Instead of writing > x = pow(x, n, 10) Either x**= n % 10 # The **= changes the parse context, so that % is no longer # immediately evaluated or x**= (n, 10) # exponentiation to a tuple isn't currently defined, and it # does show that both arguments are part of the power # expression -- but I'm not sure it needs a 3-argument form # instead of just unpacking the tuple itself. -jJ
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4