It's a slippery slope. But it would be such a minor change (>_<). Look at this little gem:
with open("datafile") as myfile:
head = [next(myfile) for x in xrange(N)]
print head
Of course, xrange()
is now just range()
, and print
is now print()
.
At some point in the (near) future, examples like this will no longer be relevant since new users will most likely start with Python 3 or later.
What's the plan?
I imagine an organic change will happen regardless: OPs editing their examples, adding the python3 tag. And then maybe users updating other people's simple snippets like this gem.
Of course, the obvious problem is the breakdown of comment relatedness. The above example is a good one, because its comments refer to both Python2 and Python3, and these comments would be irrational if the code was updated.
A related meta-topic are questions of this sort, How to deal with hugely upvoted, bad and outdated answers?.
n
from a text file will not change--much. And what ends up happening is new users have to learn how Python2.x has changed in Python3.x even before they learn Python3. That's awkward. Can I suggest there is a type-theory we need to consider; types of questions that rise to some meta-level of relatedness, and others more basic. No?