Karp updates for python