[Tutor] what does the forward slash mean in this function signature?

Albert-Jan Roskam sjeik_appie at hotmail.com
Mon Oct 15 06:58:05 EDT 2018


In Python 3.6 (Windows) I often see a forward slash in a function signature, see below. What does it mean? I vaguely remember reading something about new possbilities in python 3, something like "def foo(x, *, y)". Perhaps it's related to that?

>>> help({}.fromkeys)
Help on built-in function fromkeys:

fromkeys(iterable, value=None, /) method of builtins.type instance
    Returns a new dict with keys from iterable and values equal to value.



More information about the Tutor mailing list