py: Add support for capturing name of function objects.

First named storage object (global, local, attribute) to which function
assigned is used as such. The support actually made generic to be able
to apply to other objects too, though realistically, just various forms
of functions may need it (closures, bound methonds, properties, etc.)
py: Add tentative scheme for error messages configuration.