Why is it Convention to Repeat Function Signatures in Docstrings

But the docstring is associated to a specific implementation of a function, right? For example if I had

"""
    add(x, y)

adds x and y
"""
function add(x, y)

versus

"""
    add(x::Int, y::Int)

adds two integers x and y
"""
function add(x::Int, y::Int)

The call signature in the docstring is still the same as in the function definition, right?

1 Like