How should we mark up multiple types in a type field?

It seems to me that in very many cases, we don’t actually need multiple types in the docs. For the examples here, something like this could work:

some_func(p, timeout=None)

  • p: number – A parameter that takes an int or a float argument. A Decimal will work too, we’re not picky.
  • timeout: number ­– A timeout in seconds for blocking operations like connect(). If omitted (or None), use the global default timeout settings.

IOW, the “or None” spelling of “optional” is best left to automated tools.

2 Likes