Skip to content

Commit

Permalink
docs: remove line about Python 2.7 being unsupported
Browse files Browse the repository at this point in the history
According to the README and setup.py, we do support Python 2.7.

Also clarify that the utils module and its positional decorator
do still exist and does work in both Py2 and Py3
  • Loading branch information
rwhogg committed Oct 20, 2022
1 parent aecd927 commit 52ea0e0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/migrating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ 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::
Expand All @@ -183,13 +183,12 @@ arguments. What used to be written as::
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)
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

0 comments on commit 52ea0e0

Please sign in to comment.