qri-io / starlib

qri's standard library for starlark
MIT License
113 stars 29 forks source link

docs: multiple questions about starlark parameter types #135

Open dustmop opened 2 years ago

dustmop commented 2 years ago

How do the starlark docs represent optional parameters? Should we use an a question mark such as:

func(n?)

If so, should the page render this ? differently to make it stand out better? Perhaps a different font?

How do complex types get represented? For example "list of strings" or "tuple of two ints". One possibility is using list(string) and (int,int). Note that we can't use (int, int) because the outline parser sees the space and terminates the token.

How do we represent any types? What about type unions? For example, many DataFrame methods have parameters that are allowed to be a "list, or Series, or DataFrame, or iterable".

The answers to these types of questions should be standardized so that the docs are consistent.