3 ms·
> Having recently moved from Python (where the documentation is amazing) Huh? Python's online documentation is horrible. In addition to what vbezhenar said, th
by adwn 5y ago
> Having recently moved from Python (where the documentation is amazing)
Huh? Python's online documentation is horrible. In addition to what vbezhenar said, there are gems like this:
The arguments shown above are merely the most common ones, described below in Frequently Used Arguments (hence the use of keyword-only notation in the abbreviated signature). The full function signature is largely the same as that of the Popen constructor - most of the arguments to this function are passed through to that interface. (timeout, input, check, and capture_output are not.) [1]
"Largely the same"? What, am I supposed to divine the actually available parameters?
For built-in types, the docs are missing a way to quickly list all available methods and properties. You have to somehow piece it together from various ABCs. [2] Compare this to, e.g., Rust's online doc of its Vec type. [3]
[1] https://docs.python.org/3/library/subprocess.html#using-the-subprocess-module https://docs.python.org/3/library/subprocess.html#using-the-...
[2] For example, lists: https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range https://docs.python.org/3/library/stdtypes.html#sequence-typ...
[3] https://doc.rust-lang.org/std/vec/struct.Vec.html https://doc.rust-lang.org/std/vec/struct.Vec.html
- lupire 5y agoit says it rifht there: "timeout, input, check, and capture_output are not." For everything else, you have to consult Popen because it's Popen's API.
- zestyping 5y agohelp(list) quickly provides a list of all available methods and properties, as does help([]). Is that what you mean?
- adwn 5y agoI was refering to the online documentation. Yes, the interactive docs are sometimes better.