re all sorts of existing tools to help migrating from 2 to 3.
https://docs.python.org/3/howto/pyporting.html
https://docs.python.org/3.8/library/2to3.html
https://python-modernize.readthedocs.io/en/latest/
http://python-future.org/automatic_conversion.html
https://pypi.org/project/pylint/
It
. This is easily picked up by a lint tool... and
good python programmers use them ;-). Some python-aware editors even
have this functionality built in.
Using the above example:
$ pylint who_no.py
...
C: 1: Missing docstring
C: 5: Comma not followed by a space
this functionality built in.
Using the above example:
$ pylint who_no.py
...
C: 1: Missing docstring
C: 5: Comma not followed by a space
for i in range(1,1):
^^
E: 8: Undefined variable 'malformed'
E: 8: Undefined
-3.0.11
[ebuild U ] dev-libs/libffi-3.0.13 [3.0.12] USE=-debug -pax_kernel
-static-libs {-test} 826 kB
[nomerge ] dev-python/pylint-0.27.0 USE=-examples
[nomerge ] dev-python/logilab-common-0.59.0 USE=-doc {-test}
PYTHON_TARGETS=python2_7 python3_2 -pypy1_9 -pypy2_0 -python2_6
4 matches
Mail list logo