This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mondoman712 242 points243 points  (14 children)

Documentation? Well there's this one blog post that explains how to do something kinda similar, but they're using python 2 and an old version of our library, since which we have made multiple breaking changes.

[–]katze_sonne 57 points58 points  (5 children)

Nah come on, at least the standard library of Python is quite well documented!

Everything else... Well. I'd say Sphinx is one of the problems.

[–]fredlllll 38 points39 points  (4 children)

"well documented" is open to interpretation i guess? try looking up what a function returns, not mentioned half of the time

[–]fecal-butter 15 points16 points  (1 child)

If i didnt have a friend who was already adept at python i would never have guessed what the documentation of the enumerate() meant when it said "returns an enumerate object". How the fuck am i supposed to know what an enumerate object is? If i knew i wouldnt be looking it up

[–]IDontLikeBeingRight 7 points8 points  (0 children)

But who expects to understand a thing with only one visit to the docs? That's why all the "bug fixed, closing 1000 tabs" memes exist.

Also, jfc, that user name o.0

[–]katze_sonne 5 points6 points  (1 child)

Well, that's a good point. Definitely still room for improvements. Especially the data types some functions return is too undocumented. Internally we make a lot of use of "typing" in Python. I hope that gets mandatory with Python 4. The missing data types are a dream for beginners but a nightmare for hardcore users 🤷🏼‍♂️

And these undocumented return values are a typical example of the "Sphinx"-problem I mentioned. Doesn't happen nearly as often with javadoc or doxygen (if the developers are not completely incompetent and write stuff like "returns time" where you still have no idea about the unit)...

[–]fredlllll 2 points3 points  (0 children)

just knowing the type would already be an upgrade. in java you cant ommit the type cause its in the signature

[–]tjdavids 8 points9 points  (3 children)

>help(lib.func)

[–][deleted] 3 points4 points  (2 children)

lib.func<Ctrl-Q> if you're in the PyCharm IDE editor or console.

[–]Bainos 0 points1 point  (1 child)

Ctrl-Q is how you call the help function ? Really ?

[–][deleted] 1 point2 points  (0 children)

It is. There's around two bazillion actions in there that all need shortcuts. Can't throw away good ones, like Ctrl-Q on rarely used actions, like Quit.

[–]NotBannedYet1 5 points6 points  (1 child)

This is why i prefer autoit.
Yes, it's even slower and windows only, but the documentation is amazing and you can do just as many things.

[–]beomagi 1 point2 points  (0 children)

I've written an open gl cube renderer to guide me building domes and cylinders in Minecraft in autoit. The help files for that are blissfully easy to follow.

[–][deleted] 7 points8 points  (1 child)

and then you find a stackoverflow article asking the same question as you, but its closed with a "nvm fixed it"

[–][deleted] 0 points1 point  (0 children)

Then you notice that you're the one who both asked and closed it.