cleanup: tweak declarations in pycomp.h.
py: fix: certain string assignments should raise TypeError, never SystemError.