Minor style cleanup
Improve PY2 detection w.r.t Mercurial demandimport