classification
Title: Document that __length_hint__ may return NotImplemented
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, jdemeyer, steve.dower
Priority: normal Keywords: patch

Created on 2019-08-22 10:17 by jdemeyer, last changed 2019-09-10 14:58 by steve.dower. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 15383 merged jdemeyer, 2019-08-22 10:26
PR 15860 merged steve.dower, 2019-09-10 14:03
PR 15862 merged steve.dower, 2019-09-10 14:06
PR 15863 merged steve.dower, 2019-09-10 14:25
PR 15864 merged miss-islington, 2019-09-10 14:31
Messages (6)
msg350180 - (view) Author: Jeroen Demeyer (jdemeyer) * (Python triager) Date: 2019-08-22 10:17
The special method __length_hint__ can return NotImplemented. In this case, the result is as if the __length_hint__ method didn't exist at all. This behaviour is implemented and tested but not documented.
msg351664 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-10 14:01
New changeset 009ef2955d91e04f62a7159a1c7ddaddbfedc3b6 by Steve Dower (Jeroen Demeyer) in branch 'master':
bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)
https://github.com/python/cpython/commit/009ef2955d91e04f62a7159a1c7ddaddbfedc3b6
msg351671 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-10 14:25
New changeset a39a4c7439ed09069e619c10d30a6d0ec9332d1a by Steve Dower in branch 'master':
bpo-37913: Link to NotImplemented from new docs (GH-15860)
https://github.com/python/cpython/commit/a39a4c7439ed09069e619c10d30a6d0ec9332d1a
msg351675 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-10 14:31
New changeset ed99bb9ca68b37cfaec3629afa67d70289f3ffc7 by Steve Dower in branch '3.8':
bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)
https://github.com/python/cpython/commit/ed99bb9ca68b37cfaec3629afa67d70289f3ffc7
msg351680 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-10 14:42
New changeset aa3b629a09bfcdf26cdfbbf7d6445ae333c0d44d by Steve Dower in branch '3.7':
bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)
https://github.com/python/cpython/commit/aa3b629a09bfcdf26cdfbbf7d6445ae333c0d44d
msg351693 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-10 14:57
New changeset 756eb849d7d968f0a0924fa33b68c62831e8884e by Steve Dower (Miss Islington (bot)) in branch '3.7':
bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)
https://github.com/python/cpython/commit/756eb849d7d968f0a0924fa33b68c62831e8884e
History
Date User Action Args
2019-09-10 14:58:06steve.dowersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-09-10 14:57:19steve.dowersetmessages: + msg351693
2019-09-10 14:42:01steve.dowersetmessages: + msg351680
2019-09-10 14:31:37miss-islingtonsetpull_requests: + pull_request15511
2019-09-10 14:31:29steve.dowersetmessages: + msg351675
2019-09-10 14:25:39steve.dowersetpull_requests: + pull_request15510
2019-09-10 14:25:15steve.dowersetmessages: + msg351671
2019-09-10 14:06:41steve.dowersetpull_requests: + pull_request15509
2019-09-10 14:03:13steve.dowersetpull_requests: + pull_request15507
2019-09-10 14:01:16steve.dowersetnosy: + steve.dower
messages: + msg351664
2019-08-22 10:26:51jdemeyersetkeywords: + patch
stage: patch review
pull_requests: + pull_request15093
2019-08-22 10:17:07jdemeyercreate