Hacker News new | ask | show | jobs
by wmonk 3006 days ago
Coming from well established js libs to python I have found the documentation really hard to deal with.

I'm not entirely sure why that is. I really like getting to a repo on github and having the docs in the readme. Both python and rust have their own language specific doc implementations ReadTheDocs and docs.rs (I think). And you usually have to go to a separate site to view them which is fine, but I really dislike ReadTheDocs. It anyways seems really hard to find what I actually want. Take flask and alembic

2 comments

That's absolutely true. Python documentation severely lacks the necessary detail. Especially the newer doc format on that lighter background.
The Python criticism I heard is that it makes it harder for library writers because they have to dive into source code. But here's the thing, when using a dynamic language with duck typing you don't really care what type specifically something is, only that you can iterate over it. I experienced the difference when porting someone's Python application to Rust. In Python, I didn't care what type the argument is, only what operations are performed. When writing the Rust equivalent, the Rust compiler was quick to complain it wanted to know the exact type.

So I think Python docs are good for dynamic languages, while Rust documentation pleases people used to static languages.

I think the problem is that the Python docs often put the examples at the end, when they should be right at the top.