GPG: make _ident more pythonic