This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients mark.dickinson, seberg, serhiy.storchaka, tcaswell, terry.reedy, vstinner
Date 2019-08-30.02:26:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:42terry.reedysetrecipients: + terry.reedy, mark.dickinson, vstinner, serhiy.storchaka, seberg, tcaswell
2019-08-30 02:26:42terry.reedysetmessageid: <>
2019-08-30 02:26:42terry.reedylinkissue37980 messages
2019-08-30 02:26:41terry.reedycreate