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 taleinat
Recipients larry, serhiy.storchaka, taleinat
Date 2015-04-27.17:53:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If I was writing a function/method with a conceptually boolean parameter (True/False), I wouldn't want that to accept any Python object. For example, I would want passing a tuple or list to raise a TypeError. But according to the docs[1], that's what the 'p' converter does.

If Python had a separate boolean type, this would be simple, but bool is a subclass of int, and it is easy to get a 0 or a 1 instead of True or False without noticing. So it seems reasonable when using the C API to accept an int when you want to get a boolean. I'd want a converter to convert it to a C bool, of course.
Date User Action Args
2015-04-27 17:53:07taleinatsetrecipients: + taleinat, larry, serhiy.storchaka
2015-04-27 17:53:07taleinatsetmessageid: <>
2015-04-27 17:53:07taleinatlinkissue24037 messages
2015-04-27 17:53:07taleinatcreate