I am writing a macro that takes the name of a function and declares a couple of other versions of the function. I want to give these variations the same line of the document as the original method, possibly a few changes.
For this, I need to get a docstring for the original method.
So, I am looking for a function:
get_docstring(functionname::Symbol, argtypes)::String
So that I can:
julia> s=get_docstring(:values,(Associative,)), and then the svalue will be set:
s="""
values(a::Associative)
Return an iterator over all values in a collection.
`collect(values(d))` returns an array of values.
```jldoctest
julia> a = Dict('a'=>2, 'b'=>3)
Dict{Char,Int64} with 2 entries:
'b' => 3
'a' => 2
julia> collect(values(a))
2-element Array{Int64,1}:
3
2
```
"""
source
share