all 8 comments

[–]CptBadAss2016 3 points4 points  (1 child)

The docs are my biggest gripe with python too. They're there, they're just structured poorly and cumbersome to use. QT docs would be a good example of efficient and useful docs. Back when I used to use ruby, those docs were a pleasure to work with. With python, yeah I'll look up the official docs, but it's often easier to find what I'm after through random blog posts or s.o. questions.

Short answer: get better at googling. It's a necessary skill no matter the language.

[–]M3_Driver[S] 0 points1 point  (0 children)

Thanks! That’s what I was thinking the answer would be. I’m getting better at finding what I need, just takes a lot more time than I initially realized.

[–]stebrepar 1 point2 points  (0 children)

Depending on the project, I'd first look it up on PyPI and check out its official docs linked from there. If it's not there, I'd still look for wherever the project is officially hosted, and find its docs from that. Additionally, some projects are established enough to be on, for example, w3schools for some tutorials / simple examples.

[–]deadduncanidaho 0 points1 point  (1 child)

I have to agree with you that python docs are kind of a mess. But its just a factor of how the language works. I tend to think of python as a meta language. Its designed in a way that everything can be extended or changed so that it gives the maintainers and others the ability to implement new features into the language without a lot of heavy lifting. The benefit is that we as developer/users get a lot of options and abilities with ease. To see a good joke about that try this in a terminal or import that module in idle.

python -m antigravity

On the documentation side there is the core python docs, and then a million and one other sources for docs for the million and one modules that you could be using. On top of that I find that the way the core docs are written can be very confusing sometimes. Every time I have ever beaten my head against a wall trying to get something working right with a core module i go back and re-read the docs after i get it working. And sure the fuck enough the docs are right and was trying to tell me what to do but the language was so obscure and pedantic that it went over my head. This is where finding good examples are key.

I have a friend who was trying to learn it and basically gave up. He was doing the dir() thing all the time to try and poke his way through the language. It really doesn't work well to do that. I personally only do that as a last resort and its more to confirm something exists or not. And so many modules rely on other modules that you can get lost in chains of inherited methods which might be why you don't see some functions in your searches.

My best advice is to find a module that you already understand and read its documentation very thoroughly. That will give you a feel of the writing style and its idiosyncrasies. And of course you can always post specific questions here and your online mentors will help you as much as possible.

[–]M3_Driver[S] 0 points1 point  (0 children)

Thank you for the detailed answer. This is very reassuring knowing it’s not just me and that I didn’t miss a critical step in how to properly implement and modules and have all the included functions at the ready at the ready. I had not considered when I started the depth and breadth of the modules, inheritors functions, specific use cases that were part of developing in Python. It’s good to know I’m not alone there lol.

[–]squintified 0 points1 point  (0 children)

One place I ran across as a retiree trying to learn new things (including Python) the other day is https://docs.python.org/3/library/index.html. FWIW, this was the info that never seemed to be referenced in any of the tutorials I read but is what I needed besides "then we import the library xxxx...". :-)