2018-01-18 10:26 GMT+01:00 Larry Hastings <la...@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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com