Terry J. Reedy <tjre...@udel.edu> added the comment:
PR-11952 was written by Serhiy and reviewed by Victor (and Mark). They are better qualified to comment on its intended side effects than I am. In the case of sorting, the exception for, say, "reverse='a'", says the flag must be an 'integer' since at least 2.7, which likely means forever. If 'not index' implies 'not integer', we should close as 'not a bug' (unless we make a liberal general rule about boolean flag values). Mark's link is to "def resolve(self, path, strict=False):" where 'strict' is used in 'if strict:'. If this is 'normal', then perhaps 'reverse' is treated too strictly. I have not thought about what is normal, at least for builtins, for boolean flags since, like most people, I usually use explicit True or False. Among builtins: compile(..., dont_inherit=False,...) # '' rejected, integer required print(..., flush=False) # '' ok sorted(..., reverse=False) # integer required open(..., closefd=True) # 'a' rejected, integer required (1).to_bytes(1, 'big', signed='') # OK int.from_bytes(b'\xfc\x00', 'big', signed='') # OK b'ab c\n\nde fg\rkl\r\n'.splitlines(keepends='a') # integer required So far, 4 to 3 in favor of integer required. I don't see any particular sense to the choices. An interesting can of worms. ---------- nosy: +serhiy.storchaka, vstinner _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37980> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com