Skip to main content
deleted 21 characters in body
Source Link
Neil G
  • 33.1k
  • 15
  • 7

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.

Python 2 is end of life in 3 years whereas 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.

Python 2 is end of life unlike Python 3. 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.

code fence
Source Link
cottontail
  • 22.3k
  • 6
  • 24
  • 53

Python 2 is end of life in 3 years whereas 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.

Python 2 is end of life in 3 years whereas 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:

 

you just have

 

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.

Python 2 is end of life in 3 years whereas 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.

Source Link
Neil G
  • 33.1k
  • 15
  • 7

Python 2 is end of life in 3 years whereas 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:

you just have

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.