Python 2 is end of life in 3 years whereasPython 2 is end of life unlike Python 3 will live on. We want to maximize the utility of questions and answers. Because of that, there are some situations I would definitely update code:
- if it's your question,
- if it's your answer,
- if the answer uses deprecated style, and
- if there's good reason to believe that an updated answer would be more useful to more people.
If the question is specifically marked as Python 2 and if the answer is the kind of thing that is more than a fun individual project, but could be used in a code that will persist, then I would consider updating answers to use six
. This way, code that's written using the answer would be easy to update. six
is available in Python 2 (of course), so the change is fairly transparent. For example, instead of:
from urlparse import urlparse
you just have
from six import urlparse
Doing this early will save everyone a big headache later because, for example, six
makes urlparse
work the way the Python 3 version works. Before you make this kind of change, make sure that your change is actually transparent.