On Thu, Jul 19, 2018 at 10:33:21AM +0200, Antoine Pitrou wrote: > def insort_right(a, x, lo=0, hi=None): > # ... > hi = hi else len(a)
I read that as "hi, if it is truthy, else len(a)". The advantage of ?? as None-aware operator is that it cannot possibly be misread as applying to arbitrary falsey objects: - for those familiar with the equivalent from other languages, the use of ?? to check for nil/null/None is familiar and obvious; - for those who aren't, the ?? syntax avoids leading them to guess the wrong behaviour, as "else" would do. P.S. I just had to delete 40+ screenfuls of irrelevant quoted text. Come on folks, please trim your posts! Don't blame your tools. -- Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/