So, today I noticed __length_hint__, and then operator.length_hint. Neither mentions its design purpose, only its specification. And while that is minimally enough, knowing the purpoe (size estimation for use by presized allocation operations) lets an implementor write something more appropriate.
While it'd be nice to have a short sentence with the provoking rationale for the feature in the docs, it would also be nice to reference the PEP. As a concrete example, for __length_hint__ and operator.length_hint, I wish that in addition to saying "New in version 3.4", it also said "specified by PEP424 [link]", since I had to go find that with a search engine to understand the rationale. Would PRs with such patches be welcome? Cheers, Cameron Simpson <c...@cskk.id.au> _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/HXNFMIEZH73MXYEBP4TDIK3KFPYJ4QKR/ Code of Conduct: http://python.org/psf/codeofconduct/