Skip to content

Commit a1aa5d2

Browse files
author
Bob "Wombat" Hogg
authored
docs: remove line about Python 2.7 being unsupported (#808)
* docs: remove line about Python 2.7 being unsupported 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 * Update migrating.rst
1 parent b12d2e5 commit a1aa5d2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/google-cloud-ndb/docs/migrating.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,22 +174,21 @@ a number of methods that were mostly used internally. Some of those have been
174174
made obsolete by new Python 3 features, while others have been discarded due
175175
to implementation differences in the new `ndb`.
176176

177-
Possibly the most used utility from this module outside of `ndb` code, is the
177+
Possibly the most used utility from this module outside of `ndb` code is the
178178
``positional`` decorator, which declares that only the first `n` arguments of
179179
a function or method may be positional. Python 3 can do this using keyword-only
180180
arguments. What used to be written as::
181181

182182
@utils.positional(2)
183-
def function1(arg1, arg2, arg3=None, arg4=None)
183+
def function1(arg1, arg2, arg3=None, arg4=None):
184184
pass
185185

186-
Will be written like this in the new version::
186+
Should be written like this in Python 3::
187187

188-
def function1(arg1, arg2, *, arg3=None, arg4=None)
188+
def function1(arg1, arg2, *, arg3=None, arg4=None):
189189
pass
190190

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

194193
Exceptions
195194
==========

0 commit comments

Comments
 (0)