Skip to content

Commit

Permalink
Update migrating.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
rwhogg committed Oct 26, 2022
1 parent e164593 commit ad3e9cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/migrating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ a function or method may be positional. Python 3 can do this using keyword-only
arguments. What used to be written as::

@utils.positional(2)
def function1(arg1, arg2, arg3=None, arg4=None)
def function1(arg1, arg2, arg3=None, arg4=None):
pass

Should be written like this in Python 3::

def function1(arg1, arg2, *, arg3=None, arg4=None)
def function1(arg1, arg2, *, arg3=None, arg4=None):
pass

However, ``positional`` remains available and works in both Python 2 and 3.
Expand Down

0 comments on commit ad3e9cc

Please sign in to comment.