1

I have whole project to convert from Python 2.x to 3.x. So can I go ahead & convert it by just 2to3 module?

2 Answers2

1

i think you can. maybe there will be some errors but it generly it will be going well

Matthijs990
  • 637
  • 3
  • 26
1

As you have said that you have to convert whole module there can be some warnings and some errors but they still refactoring is possible. For reference you can always go to "https://docs.python.org/2/library/2to3.html#module-lib2to3" and "https://docs.python.org/2/library/doctest.html".

  • What if didn't get any errors ? Does that mean my python file is successfully converted. – Hitesh Panjawani Mar 22 '19 at 06:52
  • Better to use static type checker as in mypy("http://mypy-lang.org/") or pytype (https://github.com/google/pytype) in your code and ensure that every function serves the purpose expected in both versions of python. – Ritesh Kumar Mar 24 '19 at 19:02