Skip to content

bpo-36540 What's New section for PEP 570 #12942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Doc/whatsnew/3.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,31 @@ See :pep:`572` for a full description.
.. TODO: Emily will sprint on docs at PyCon US 2019.


Positional-only parameters
--------------------------

There is new syntax (``/``) to indicate that some function parameters
must be specified positionally (i.e., cannot be used as keyword
arguments). This is the same notation as shown by ``help()`` for
functions implemented in C (produced by Larry Hastings' "Argument
Clinic" tool). Example::

def pow(x, y, z=None, /):
r = x**y
if z is not None:
r %= z
return r

Now ``pow(2, 10)`` and ``pow(2, 10, 17)`` are valid calls, but
``pow(x=2, y=10)`` and ``pow(2, 10, z=17)`` are invalid.

See :pep:`570` for a full description.

(Contributed by Pablo Galindo in :issue:`36540`.)

.. TODO: Pablo will sprint on docs at PyCon US 2019.


Parallel filesystem cache for compiled bytecode files
-----------------------------------------------------

Expand Down