More pythonic implementation and docstring refinement [Fix5505]