JuliaLang/julia — pull request #4712 by carlobaldassi (2013-11-02 16:23:07+00:00)
Title: Another attempt at fixing #4697

Maybe 0.2.x material.

This should not suffer from the drawback pointed out by Jeff in #4699.

After this change:

* `help(f)` filters function definitions if `f` is a `Function`, so e.g. `help(Pkg.init)` only shows the help for the right function, not also `Profile.init` (but if a function is extended by another module and it's the same generic function it is shown too)
* A fallback is added such that `"Base."` is prepended as default; e.g. calling `help("Pkg.init")` now works (previously only `"Base.Pkg.init"` or `"init"` were recognized)

The filtering is done by getting a function object from a string via `eval`, and comparing the result with the given function object; it's a little bit ugly but I hope that's fine.