]> granicus.if.org Git - python/commit
Multiple clean-ups to the docs for builtin functions.
authorRaymond Hettinger <python@rcn.com>
Wed, 1 Jun 2011 22:50:34 +0000 (15:50 -0700)
committerRaymond Hettinger <python@rcn.com>
Wed, 1 Jun 2011 22:50:34 +0000 (15:50 -0700)
commit690d4ae8bf6e930538cf7d23ff3ff09eb1f875ed
tree1be44a9615cce27424f837f8dee4c178a94c43be
parent783a30f38e67ebd828cc32ca93db8579d0efffb8
Multiple clean-ups to the docs for builtin functions.

* Use concrete example for dir() and eliminate the distracting doctest directives.
* Add a pure python equivalent for enumerate()
* Modify the enumerate() example to demonstrate the start argument
* Remove incorrect reference the *iterable* in the enumerate() docs.
* Downgrade the comments on input() from a warning to a note.
* Fix the iter() example to use the empty string as the terminating
  condition for file.readline().  Also, the old example was broken
  because readline() results include a newline, so 'STOP\n' would have
  been the correct terminating condition.  Even with that fix, the
  STOP example was fragile and would have lead to infinite loops with
  malformed inputs.
* Do not refer to classmethod as being "more advanced" than staticmethod.
Doc/library/functions.rst