in grub 9999 source: util/import_gcry.py, line 137, has_key() is called on a dictionary, which is removed in python 3.1 after eselect python2.7 as the default system while python, grub-9999 installs fine
"(the default python in new installation)" - It shouldn't be. Please post your `emerge --info' output.
Don't forget to attach the entire build log too.