
July 2, 2012
12:35 p.m.
On 7/2/2012 7:32 AM, Serhiy Storchaka wrote:
On 02.07.12 11:52, Steven D'Aprano wrote:
Another alternative would be a __max__ and __min__ protocol that allowed efficient answers for the max() and min() builtins. The latter would have the advantage of allowing other containers (like range objects) to provide efficient implementations.
+1 on that, although I think that should be a separate issue.
This is issue #15226.
http://bugs.python.org/issue15226 was about exposing the max codepoint, which the OP thought was readily available in C, but is not. (It is at creation, but it is then replaced by 1 of 4 values.) -- Terry Jan Reedy