sys-libs/libcap-1.10-r10 should call python_mod_optimize and python_mod_cleanup with the appropriate arguments in postinst and postrm if python USE flag is set. Failing to do so can leave python .pyc and .pyo files behind. This happened for me with leftover libcap.py{c,o} files in python2.4 site-packages after upgrading to python2.5.
in cvs as r11 now.