You can get more than the string, you can get the abstract syntax tree (AST) for a function. Given a function foo, you can get the AST from
foo.env.defs.func.code
However, if foo has multiple methods (multiple implementations for
different argument types), you may need to walk through the method list (a
linked list starting with foo.env.defs) in order to find the method you
want.
(There really should be a reflection function to look up the Method given a
Function and an argument-type tuple.)
