[Tutor] What is meaning of "/" in "pow(x, y, z=None, /)"?

eryk sun eryksun at gmail.com
Wed Aug 2 02:59:30 EDT 2017


On Wed, Aug 2, 2017 at 1:06 AM, boB Stepp <robertvstepp at gmail.com> wrote:
> I had typed help(pow) in the interpreter and got:
>
> <quote>
> py3: help(pow)
> Help on built-in function pow in module builtins:
>
> pow(x, y, z=None, /)
>     Equivalent to x**y (with two arguments) or x**y % z (with three arguments)
>
>     Some types, such as ints, are able to use a more efficient algorithm when
>     invoked using the three argument form.
> </quote>
>
> A quick scan of some of my Python books does not turn up the use of
> "/" as a function argument.  I have a nagging feeling I've read about
> this somewhere previously, but I cannot bring it to mind, and I have
> yet to stumble on a search that brings up an answer (Yet.).

We discussed this syntax several months ago:

https://mail.python.org/pipermail/tutor/2017-February/thread.html#110344


More information about the Tutor mailing list