Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Variant types in docstrings #1

Open
eaaltonen opened this issue Apr 13, 2018 · 1 comment
Open

Variant types in docstrings #1

eaaltonen opened this issue Apr 13, 2018 · 1 comment

Comments

@eaaltonen
Copy link

I just encountered a need to declare a variant return type, roughly as follows:

Returns
-------
float or None
    Description of return value

This does produce reasonable output, but I see it would be beneficial if the documentation gives some recommendation regarding variant types.

@McSinyx
Copy link

McSinyx commented Apr 9, 2020

Hi, with PEP 484 in mind, this can be documented as Optional[float].

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants