4 ms·
I guess this part is pretty subjective, but I do find PHP's docs more readable. Here's an example I ran into recently, taking my first babysteps into Python: h
by soneil 12y ago
I guess this part is pretty subjective, but I do find PHP's docs more readable.
Here's an example I ran into recently, taking my first babysteps into Python: https://docs.python.org/2/library/json.html https://docs.python.org/2/library/json.html vs http://php.net/manual/en/function.json-encode.php http://php.net/manual/en/function.json-encode.php
As far as I can tell, these should be functionally similar, at least for my goal of returning an array as json.
The first thing to compare is the very first line - where the php docs tell me quite clearly what this function does. Compare to what I can only call waffle on the Python docs.
The php docs go on to tell me: what the arguments are, what types they are, and what options are acceptable. Followed by examples that start with the very basic, and go on to cover some more involved scenarios - but are all self-documenting and standalone.
The Python docs start off with some examples that frankly, aren't self-documenting. I'm still not sure what type is being passed, or returned, in the first example. The following examples appear to be trying to cover some edge cases, but don't say what, or why. This for me is the huge difference - the documentation is the last place I expect to be trying to guess what they mean.
We them get into the "basic usage" section where my eyes frankly glaze over.
It seems the Python docs to go into a lot more depth, so could be called better-documented from that point of view. But my original argument was that the PHP docs are incredibly accessible, and I stand by that.
- mkesper 12y agoI always found Python docs very readable. Did you try the tutorial? Oh, and do yourself a favour and start with Python3.