[docs] [issue27671] FAQ: len() is still function for good reason.

INADA Naoki report at bugs.python.org
Wed Aug 3 05:01:26 EDT 2016


New submission from INADA Naoki:

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

----------
assignee: docs at python
components: Documentation
messages: 271881
nosy: docs at python, methane
priority: normal
severity: normal
status: open
title: FAQ: len() is still function for good reason.

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


More information about the docs mailing list