[New-bugs-announce] [issue41636] distutils.util.strtobool documented behaviour

Graham Oliver report at bugs.python.org
Tue Aug 25 20:48:02 EDT 2020


New submission from Graham Oliver <greenbay.graham at gmail.com>:

Here is the text 

https://docs.python.org/3.6/distutils/apiref.html#distutils.util.strtobool

Convert a string representation of truth to true (1) or false (0).

True values are y, yes, t, true, on and 1; false values are n, no, f, false, off and 0. Raises ValueError if val is anything else.

I wondered what would happen with 'FALSE' i.e. upper case. It appears to behave the same way as 'false'. In fact case does not seem to be an issue, so 'FaLsE' will return 0 as well.

So a note that this function is independent of case may be helpful

----------
assignee: docs at python
components: Documentation
messages: 375902
nosy: Graham.Oliver, docs at python
priority: normal
severity: normal
status: open
title: distutils.util.strtobool documented behaviour
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41636>
_______________________________________


More information about the New-bugs-announce mailing list