[LIBCLOUD-554] Fix compatibility with python 2.5. Add better docstring