30

Worst job I had as a developer:

Convert all Python2.7 code the team wrote for the last 5 years to Python3 alone.

Comments
  • 2
    When was this exactly? Because why was "the team" still using Python2 five years ago?
  • 6
    @Jilano Cause some of us preferred print to print()
  • 7
    @Jilano Python2 too 3 migration has to be the slowest trainwreck I have ever seen.
  • 4
    @k0pernikus I had some code I could not port of years due to libraries not being ported. Consequently I am porting that same code to C++ now. Not seeing python as good long term.
  • 2
    Iirc there are libraries that can convert python2 code into python3.

    It's in the pip repo's
  • 3
    The Haptik AI Team had posted an amazing blogpost on how they did it. You should check it out.

    https://haptik.ai/tech/...
  • 1
    @Jilano I started the process mid November last year.

    The team followed the advice of a client. I did not question them.
  • 1
    That sounds awful.
  • 3
    Perhaps if major *nix distros switched 2.x for 3.x as the base Python package sooner instead of waiting for EOL, the whole community and companies using it would follow the initiative...

    After all, even someone who always uses the most up-to-date things will think twice when they have to choose between
    - writing a portable script in Python 2 and having it run on most Linux systems out-of-the-box, or
    - writing it in Python 3 and having to first install a whole bunch of packages everywhere they want to run it
  • 0
    Automated Python 2 to 3 code translation
    See this :
    https://docs.python.org/2/library/...
Add Comment