On Mon, Mar 6, 2017 at 6:13 AM, Ed Kellett <edk...@gmail.com> wrote: > The point about this as a Python change is that it's a standard. Who does > the work couldn't be less relevant; what matters is that it would add a > consistent and easy spelling for something that doesn't have one.
Oh, absolutely! Because a language totally needs to have a consistent and easy spelling for everything. How about reading one line of text from a compressed file and stripping HTML tags from it? http://php.net/manual/en/function.gzgetss.php Not everything has to be a single function/method. Some things are allowed to be more than one. To justify list.get(), you have to show that it's actually worth adding to the language, and so far, all you've said is "but wouldn't it be nice". Show us code that would be improved by this method. SHOW US CODE. > They seem to be "it'd need to be added to Sequence too" and "it would mess > with code that checks for a .get method to determine whether something is a > mapping". It's easily implementable in Sequence as a mixin method, so I'm > prepared to call that trivial, and I'm somewhat sceptical that the latter > code does—let alone should—exist. Classes don't generally inherit from Sequence, though. You can't simply add methods to these kinds of protocols. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/