[docs] [issue16155] Some minor doc fixes in Doc/faq

Terry J. Reedy report at bugs.python.org
Sun Oct 7 19:56:36 CEST 2012


Terry J. Reedy added the comment:

Doc corrections (can) go in all current docs.

1.2 - 1.0: same change
"Hello" * 3: same change

dir([]): shouldn't output be line-wrapped
3.3: same
3.2: delete __dir__, clear, copy, giving
['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']

2.7: same deletions, add __delslice__, __getslice__, __setslice__, giving
['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']

# for 2.7, 3.2, delete clear, copy for
>>> [d for d in dir([]) if '__' not in d]
['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']

Change Boolean 0,1 outputs to False,True. This was done in most places when behavior was changed after booleans were added in 2.2, or you would see many more errors. This holdover in the faq is an oversight.

In 3.3 and before, help() does not lead to a new pager/display on Windows, so I am not sure what you mean. I presume you are referring to the following.

>>> help(L.append)
Help on built-in function append:

append(...)
    L.append(object) -> None -- append object to end

>>> 

The above from 3.3, and same before, has a blank line that is not in the faq, so add it. It otherwise looks the same to me.

----------
versions: +Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16155>
_______________________________________


More information about the docs mailing list