[Python-ideas] string codes & substring equality

Andrew Barnert abarnert at yahoo.com
Sun Dec 1 00:42:31 CET 2013


On Nov 28, 2013, at 22:49, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:

> spir wrote:
>> (But then, possibly, some would wonder why this new ord(s,i) is not a string method ;-)
> 
> For the same reason that the existing ord() function isn't
> a string method, whatever that is!

http://docs.python.org/2/faq/design.html#why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list

The short version is: historical reasons, and no reason to change it compelling enough to be worth the costs in backward compat, bikeshedding, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20131130/ffee5576/attachment-0001.html>


More information about the Python-ideas mailing list