_______________________________________________On Tue Dec 29 06:22:58 EST 2015, Stephen D'Aprano wrote:So that's three perfectly reasonable behaviours: max(x, None) is an error and should raise;
max(x, None) ignores None and returns x;
max(x, None) is unknown or missing and returns None
(or some other sentinel representing NA/Missing/Unknown).For comparison's sake, SQL ignores NULL when doing MAX:e.g.select max(val)from (values (1),(null)) v(val)returns1In Python, None is sorta-kinda a bit like NULL in SQL, so one could make the argument that None should be handled similarly in min and max. OTOH I wouldn't want to see Python implement 3-valued logic.--Gerald Britton, MCSE-DP, MVP
LinkedIn Profile: http://ca.linkedin.com/in/geraldbritton
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/