Author inada.naoki
Recipients docs@python, inada.naoki
Date 2016-08-03.09:01:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za>
In-reply-to
Content
https://docs.python.org/3/faq/design.html#why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list

> The major reason is history.
...
> but it’s a part of Python, and it’s too late to make such fundamental changes now. The functions have to remain to avoid massive code breakage.

People seeing this answer may think "it's bad design, but remains for historical reason."

But there is more positive reason why len is still function.
http://effbot.org/pyfaq/why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list.htm
History
Date User Action Args
2016-08-03 09:01:26inada.naokisetrecipients: + inada.naoki, docs@python
2016-08-03 09:01:26inada.naokisetmessageid: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za>
2016-08-03 09:01:26inada.naokilinkissue27671 messages
2016-08-03 09:01:25inada.naokicreate