In order to keep the code DRY you should call this method from `get_version` and reuse it's `main` component.

Also I'm not sure about the naming here -- per PEP386 I think this [component](http://www.python.org/dev/peps/pep-0386/) should be name `major` and not `main`. Could you rename it while you're at it?