More importantly, Mercurial is extensible in Python -- you can write extension modules, hooks, etc., all of which have full access to the (albeit poorly-documented) Mercurial internals.
Writing extensions for Git is rather different, since you effectively can't. To extend or build on Git, you end up doing a lot of shelling out to the 'git' binary with use of 'raw' output formats and regexp-based scraping. It's pipes and shell subcommands all the way down, instead of a library-style programming API.
Which you prefer depends a lot on the diversity and preferences of the community using your repositories. Mercurial pushes you towards usability and single-language (Python) solutions, while Git easily drops into a classic UNIX-like "lots of little scripts" solution.
Seriously, though, it's probably a good fit. Mercurial is written in Python, after all.