Message350844
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. |
|
Date |
User |
Action |
Args |
2019-08-30 02:26:42 | terry.reedy | set | recipients:
+ terry.reedy, mark.dickinson, vstinner, serhiy.storchaka, seberg, tcaswell |
2019-08-30 02:26:42 | terry.reedy | set | messageid: <1567132002.27.0.544912012929.issue37980@roundup.psfhosted.org> |
2019-08-30 02:26:42 | terry.reedy | link | issue37980 messages |
2019-08-30 02:26:41 | terry.reedy | create | |
|