Note that the named .major is available only since 2.7, [0] would work for earlier 2.x versions too.
http://docs.python.org/2.7/library/sys.html#sys.version_info