[issue27215] Docstrings of Sequence and MutableSequence seems not right

2016-06-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think you're reading too much into the docs. Most useful classes provide a __new__ or __init__ to put data into instances. The docs are simply saying that that responsibility lies with the implementer rather than with the ABC. IMO, the docs are more

[issue27215] Docstrings of Sequence and MutableSequence seems not right

2016-06-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The docstrings (at least in 3.6) say subclasses must override __new__ *or* __init__. However, I think this is wrong too. The following is a correct (if not very useful) implementation of Sequence: >>> import collections.abc >>> class

[issue27215] Docstrings of Sequence and MutableSequence seems not right

2016-06-04 Thread ppperry
Changes by ppperry : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list

[issue27215] Docstrings of Sequence and MutableSequence seems not right

2016-06-04 Thread ppperry
Changes by ppperry : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___

[issue27215] Docstrings of Sequence and MutableSequence seems not right

2016-06-04 Thread Xiang Zhang
New submission from Xiang Zhang: Docstrings of Sequence and MutableSequence in collections.abc says "Concrete subclasses must provide __new__ and __init__". This seems not the truth. Not providing __new__ and __init__ is also OK. -- messages: 267249 nosy: rhettinger, xiang.zhang