-1

There is a substantial amount of scripts/code used for academic research written in python2.7 only available on a collaborator's github repos. The problem is this should be ported to python3.x someday.

Currently, is the correct standard for users to simply download the python2.7 code, apply python's 2to3, and use this code? (I guess I would e-mail the owner if 2to3 didn't work correctly...) That is, it's up to the user to generate the python3.x code.

Or would it be useful for me to port this code and request the user push it for the entire community to use. In this case, should both versions be available for use? Or should I ask the owner to replace the python2.7 code with the new python python3.x code?

What is the current standard?

ShanZhengYang
  • 12,508
  • 35
  • 106
  • 190
  • 1
    Who is "they", and why should they write more code for you? – John Coleman Jan 14 '17 at 22:21
  • @JohnColeman That's exactly the question. If code is only released in Python2.7, do users simply request for a 3.x port? If users port to 3.x 2to3 ourselves, it's still not really our code (and therefore how should it be cited academically)? – ShanZhengYang Jan 14 '17 at 22:24
  • Why should it be ported? Why can't a note by left that library only supports python2? – OneCricketeer Jan 14 '17 at 22:29

1 Answers1

1

If you bump into such a repository and convert it to Python 3, the nice thing would to do it in a fork of the repository and create a pull request. This way the repository owner can decide whether you incorporate your work back into the repository, saving other people the trouble.

You should definitely cite the original code if all you did was port it to Python 3.

zmbq
  • 35,452
  • 13
  • 80
  • 153