Two main versions of python are being used: Python 2.7 and Python 3. Many questions of both versions are being asked everyday, but the problem is that sometimes I, and others, can never tell what version of python the OP is using if they don't tell us.

Sometimes it's obvious, knowing what version is used (e.g, in Python 2.7 print is a statement and not a function. There's a nice list here). But other times it can't be. A recent question answered by me led to one user being confused on what version the OP was using. On the one hand, the OP was using print as a function, but this is also acceptable in 2.7. On the other hand, the OP was using input(), which is both a 2.7 and a 3 function (however the outcome is different).

There is no "massive" difference in Python 2 and 3, but these little things do matter on some questions.

I think we must force people asking python questions to include what type of version they are using, whether that's a tag (probably this because it's more easier to notify the OP that they did not include what version they're using) or in the question.

  • I imagine there are quite a few people using versions of Python older than 2.7, because servers (hosting servers, for example) aren't always running the most recent version. Aren't there third-party packages that don't support Python 3, too? (which might be a difference worth considering). Sep 24, 2013 at 23:53
  • 3
    How do you propose we "force" users to specify the version? Sep 25, 2013 at 0:05
  • 3
    @psubsee2003 Perhaps notify the OP to add one of the python version tags. There was a list on another question but I can't seem to find it now.
    – TerryA
    Sep 25, 2013 at 0:07
  • 2
    @Haidro and is there an issue with asking via comment? Sep 25, 2013 at 0:09
  • 3
    @psubsee2003 Sometimes the OP won't respond, it happens, leaving us to wonder what version the OP is using. It just saves us hassling the OP for what version they're using
    – TerryA
    Sep 25, 2013 at 0:10
  • 5
    @Haidro if the OP can't be bothered to respond, and the information truly is needed to provide a valid answer, then maybe instead of worrying about them, move on to another question and check back to see if they add the information later.
    – Aaron Bertrand Staff
    Sep 25, 2013 at 1:41
  • Both ruby and ruby-on-rails need this more than Python. In the more general case, virtually every tag "needs" this as much as the Python tag, which is to say, none of them do. If a user wants to scope their question to one version of a language/technology, that's their choice, it's not up to us to impose the choice upon them.
    – user229044
    Sep 25, 2013 at 2:11
  • 1+ for mudkip.. but I would propose using 'suggest' as opposed to 'force' Sep 25, 2013 at 2:14

4 Answers 4


On the surface, this sounds like a great idea. You automatically suggest that a user specify their python version. Every question has the "required version" number.

And then you run into an edge case (or 3)

  • Isn't it possible there is a generic python question that doesn't need a version tag? What is this user supposed to do? Add a version number that isn't applicable just to satisfy this requirement?
  • What if a new version comes out? Someone now has to remember to add the new version to the acceptable version tags. And if a question comes up before someone does this, how should it get handled? New users can't create tags so users may add a wrong version tag just to ask their question.
  • So correct the above issue, you give users the ability to suggested required tags. Who us going to be responsible for approving user initiated changes? And what if a bad required tag is suggested?

(The 3rd bullet is a bit if a stretch, but you have to consider it.)

What I do think is a realistic issue though is the reaction of communities for other tags.

Hey, Python requires questions to have a specific secondary tag, we want that too!

So who is going to be responsible for managing this? Will the communities manage the required tags themselves? Or will the mods? What if someone doesn't agree? How would conflicts be handled, who would cast the final decision?

My point is there are just a lot of secondary considerations to what seems like a simple idea.

However the entire issue could be solved with a 2 sentence comment:

I see you are asking a python question. It is helpful to providing you an accurate answer if you tell us the version number you are using.

  • 2
    a comment can still be added to the python tag wiki excerpt that a version tag is usually required, much like the regex tag already asks for a language tag. Sep 25, 2013 at 2:07

Wouldn't it be great if when you typed in python to the Tags field, suggested tags indicating the version would pop up?

Something like this?

enter image description here

Disclaimer: This is existing behavior. Isn't this good enough?

Perhaps you would be satisfied by editing the wiki excerpts for and instead? Or perhaps editing to suggest adding a version? Or clarifying in comments if it is relevant only occasionally?

  • 2
    the funny thing is that in your screenshot, the excerpt for python does suggest adding version, (not as a tag though) but no one reads it anyway. Sep 25, 2013 at 5:53
  • @Antti I think in my fever to add the circles, I failed to circle the most important bit. May this answer forever act as a reminder of the dangers of freehand circle abuse.
    – jmac
    Sep 25, 2013 at 5:58

The problem with Python 2 vs Python 3 questions is that whenever the OP does not specify the version number, (s)he can get a perfectly reasonable answer for the wrong version, which then gets down-voted because "it just does not work", or OP will be bombarded with lots of useless "works-for-me" comments. However, Python newbies are hardly aware of the fact that there are 2 major versions of the language, with altogether differing syntax. The exact version number is hardly as important as using python-2.x or python-3.x tags; within python 2 or 3 people would often still be using the latest minor version.

However, I am not for forcing though; adding the following in the first paragraph of tag wiki, so that it shows prominently in the "Ask a Question", could do the trick:

Notice: also tag python-2.x or python-3.x according to the version you are using


This could fester not just to a language or library version, next we would be requiring OS, kernel version, etc and it would get out of hand.

The majority of Python and other problems posed on SO I've seen would not be any more answerable if the version number was stated.

In the case of Python 3 questions, there should be enough savvy Python users to answer and be aware of the common issues which come from migrating/library incompatibilities.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .