Skip to content
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

docs: remove line about Python 2.7 being unsupported #808

Merged
merged 2 commits into from
Nov 2, 2022
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
11 changes: 5 additions & 6 deletions docs/migrating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,21 @@ a number of methods that were mostly used internally. Some of those have been
made obsolete by new Python 3 features, while others have been discarded due
to implementation differences in the new `ndb`.

Possibly the most used utility from this module outside of `ndb` code, is the
Possibly the most used utility from this module outside of `ndb` code is the
``positional`` decorator, which declares that only the first `n` arguments of
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

Will be written like this in the new version::
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

Note that this could change if Python 2.7 support is added at some point, which
is still a possibility.
However, ``positional`` remains available and works in both Python 2 and 3.

Exceptions
==========
Expand Down