Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In a way, learning Python is harder for people experienced with another language because so much of the content you find is for first-time programmers.

That said, I think I had good luck with Writing Idiomatic Python.



Yes!

When I learned Kotlin, I just read through the docs, and then knew of basically all the different concepts in the language.

For Python, the docs were comparably very bad. For instance, Decorators aren't mentioned even once in the "The Python Tutorial". In "The Python Language Reference" (if one even bother to read such a dry document) it's barely mentioned in passing. How should a new user know it's a concept and how to apply it? And the language reference links only to a glossary item, and none of them specify how parameters in a decorator is supposed to work.

Pretty frustrating experience, put me a bit off the language from the get-go.


As a non-Python dev I tried the other day to read up how decorators work in Python using the docs, can’t say it helped.


Decorators are very simple. I'm not surprised that there's not much documentation about them - there's just not much to say.

    @decorator
    def f(...): ...
is equivalent to:

    def f(...): ...
    f = decorator(f)
That's it.


If you read the docs then you basically would not know about them. My experience mirrors the people upthread. I also found that the Python community is very hostile to the idea that the docs might be insufficient, in that people suggesting this in threads were frequently belittled or it was often suggested that the questant should just learn it like they did, or that it wasn't really all that hard.


I've looked at a lot of Javadocs and Python docs. Python's docs leave a lot more up to the imagination and are generally harder to navigate around.

Compare their ThreadPoolExecutors (Python's being inspired by Java's)

https://docs.python.org/3/library/concurrent.futures.html#co...

https://docs.oracle.com/javase/7/docs/api/java/util/concurre...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: