Re:Why PHP Was a Ghetto
by MichaelSalib on Tuesday April 19, 2011 @04:24PM
(#2464065)
Python's stdlib docs could improve in places (I'm looking at you lib2to3), but a lot of the modules do include examples (see http://docs.python.org/library/collections.html#module-colle... for an, um, example). My sense is that you see heavy examples in newer modules rather than older modules because of the rise of doc string tests.
But the real reason I wanted to comment: stop dir()ing through modules! Install ipython and learn to use ? and ??. Life will be so much easier.
Personally, I'd like to see them start with example code, and then highlight a few of the more important functions, and THEN get into the gritty details.
As it is, I'm about as productive just dir()ing everything in the interactive shell, and then seeing what happens (sometimes falls down with passing options, though), and that's almost as good as the docs.
PHP though? Yuck. Although it's tons better than Joomla's documentation.