On Wed, Jun 27, 2018 at 8:16 AM Franklin? Lee <leewangzhong+pyt...@gmail.com>
wrote:

> On Wed, Jun 27, 2018, 10:31 Steven D'Aprano <st...@pearwood.info> wrote:
>
>> On Wed, Jun 27, 2018 at 06:52:14AM -0700, Michael Selik wrote:
>> > My intent was to ask where a range was in fact passed into max, not
>> merely
>> > where it could be. It'd be enlightening to see a complete, realistic
>> > example.
>>
>> A complete, realistic example is as I said: you call max() on some
>> object which you don't control, the caller does. You could be
>> passed a list, or a set, or a bitset, a binary search tree, a range
>> object, whatever the caller happens to pass to you.
>>
>
> Let's just assume Michael wants to know, and isn't making an argument
> against the proposal.
>

I do want to know, but it's also an argument against the proposal -- that
no one has contributed in-context usage to demonstrate the value. I'd want
to see code that currently uses ``if isinstance`` to switch between
``max(x)`` and ``x.max()``. Chris Barker explained the issue well.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to