Skip to content

what is the recommended way to document arguments used only for their type for SIGNATURES? #161

@tpapp

Description

@tpapp

This is not (yet) a feature request, just asking for advice on using this package.

Sometimes the value of an argument is not directly relevant, as the body uses their type. Eg (contrived MWE)

using DocStringExtensions

"""
$(SIGNATURES)

Generate a tuple of the first `3N` odd numbers.
"""
foo(::Val{N}) where N = ntuple(i -> 2 * i - 1, Val(2 * N))

which renders as

foo(_)

Generate a tuple of the first 3N odd numbers.

What is the recommended approach to deal with this?

(Using TYPEDSIGNATURES just gives a docstring without the signature, but maybe that is a separate issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions