co.co_name
The above is a lot shorter, a lot faster, and works for functions defined in the user session (which codehack fails for).
Perhaps this was written before co.co_name existed?