Message 338323 - Python tracker

Message338323

Author serhiy.storchaka
Recipients Abhinav Gupta, serhiy.storchaka
Date 2019-03-19.07:40:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552981239.08.0.147305721686.issue36358@roundup.psfhosted.org>
In-reply-to
Content
Yes, this is expected. bool('False') is True.

You can write your own converter which returns True for 'True', False for 'False' and raise an exception otherwise.

But it is more common to add a pair of options without arguments --foo/--no-foo, or --with-foo/--without-foo, or --enable-foo/--disable-foo using the "store_const" action with True/False value.
History
Date User Action Args
2019-03-19 07:40:39serhiy.storchakasetrecipients: + serhiy.storchaka, Abhinav Gupta
2019-03-19 07:40:39serhiy.storchakasetmessageid: <1552981239.08.0.147305721686.issue36358@roundup.psfhosted.org>
2019-03-19 07:40:39serhiy.storchakalinkissue36358 messages
2019-03-19 07:40:38serhiy.storchakacreate