Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python version, "2.7.2+", what does the plus mean?

I have a virtual environment that I installed some time ago. When I activate it and run python I'm told that the version number is

Python 2.7.2+ (default, Oct  4 2011, 20:03:08)

What does the plus after the version number mean?

And could that somehow explain why the function os.urandom is not defined, even when (according to the documentation) it has been there since version 2.4.

>>> from os import urandom
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name urandom
like image 645
Mads Skjern Avatar asked Aug 15 '12 06:08

Mads Skjern


1 Answers

From the Python FAQ:

You may also find version numbers with a “+” suffix, e.g. “2.2+”. These are unreleased versions, built directly from the CPython development repository. In practice, after a final minor release is made, the version is incremented to the next minor version, which becomes the “a0” version, e.g. “2.4a0”.


And for your second question, the inability to import urandom in a virtualenv is a known problem.

This answer to a similar question should be helpful.

like image 51
David Cain Avatar answered Sep 28 '22 04:09

David Cain