Jun-19-2019, 06:20 PM
I'm using IDLE with Python 3.7.3 in Windows. When requesting help for some built-in functions (e.g. get and setdefault) I'm getting back documentation that appears to indicate there is 1 more argument than the functions actually support. Here are some responses from IDLE. I tried from a Windows command prompt and see the same thing.
Thanks for any explanations you can provide.
>>> help({}.get) Help on built-in function get: get(key, default=None, /) method of builtins.dict instance Return the value for key if key is in the dictionary, else default. >>> help({}.setdefault) Help on built-in function setdefault: setdefault(key, default=None, /) method of builtins.dict instance Insert key with a value of default if key is not in the dictionary. Return the value for key if key is in the dictionary, else default.Why is there what appears to be an extra argument (", /") at the end of the list? What's the purpose of the ", /" at the end? Is it a bug in the documentation?
Thanks for any explanations you can provide.