Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
On 8/9/16 1:42 PM, Terry Reedy wrote: > On 8/9/2016 9:22 AM, Joseph Bane wrote: >> Hello. >> >> It recently came to my attention that the strtobool function in the >> standard library doesn't return Python native boolean values, but >> rather returns integ

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
False >>> 0 is False False I am definitely not arguing that this behavior be changed, but just putting the larger issue into context. On Tue, Aug 9, 2016 at 9:34 AM, Michael Selik wrote: > On Tue, Aug 9, 2016 at 9:26 AM Joseph Bane wrote: > >> Hello. >> >> It

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
On Tuesday, August 9, 2016 at 9:34:44 AM UTC-4, Michael Selik wrote: > On Tue, Aug 9, 2016 at 9:26 AM Joseph Bane wrote: > > > Hello. > > > > It recently came to my attention that the strtobool function in the > > standard library doesn't return Pytho

Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
Hello. It recently came to my attention that the strtobool function in the standard library doesn't return Python native boolean values, but rather returns integer 0 or 1: https://hg.python.org/cpython/file/3.5/Lib/distutils/util.py#l304 I am curious why this is the defined behavior and whethe