2018-01-18 10:26 GMT+01:00 Larry Hastings <larry at hastings.org>: > Why did Argument Clinic choose that syntax? It was suggested by one Guido > van Rossum in March 2012: (...) > I'm not wading into the debate over what syntax Python should use if it adds > positional-only parameters, except to say that I think "/" is reasonable. > If Python winds up using a different syntax, I'd look into modifying > Argument Clinic so that it accepts both this hypothetical new syntax and the > existing syntax using "/". The "/" syntax is used since Python 3.5, at least in some function docstrings: --- $ python3.5 Python 3.5.4+ (heads/3.5:fd8614c5c5, Dec 18 2017, 12:53:10) >>> help(abs) Help on built-in function abs in module builtins: abs(x, /) Return the absolute value of the argument. --- inspect.signature() is able to parse this syntax, but currently, it is only used to parse __text_signature__ attribute of builtin functions. Victor
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