[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-12-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: I tried sending this message earlier, but it seems to have disappeared into the void, so I'm trying again. Apologies if it turns up twice. * * * > There are almost 500 occurrences of "is true". We can worry about them if and when somebody raises them as a

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue38738. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In some cases "a true value" and "a false value" are used in the documentation. But in most cases it is just "true" and "false". -- ___ Python tracker

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Mark Dickinson
Mark Dickinson added the comment: [Terry] > A correct failure message, correct both as English and Python, should be > something like 'bool(x) is not True'. I see 'x is not true' as an informal > English equivalent of the full claim. I'm not clear whether you're suggesting having

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-07 Thread Petr Viktorin
Petr Viktorin added the comment: Generally, „true“ and „false“ refer to „truthiness“, while the actual ``True`` and ``False`` literals should be capitalized. And in monospace font if possible. I think this is a good convention, but it's quite subtle, and I don't think it's explicitly

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there is anything wrong with terms "true" and "false" (I don't know), we should fix this not only in one particular place, but everywhere. If there is nothing wrong with them, there is nothing to "improve". If this depends of the context, we should

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: I have tried sending this message by email twice, and both times it seems to have disappeared. So I'm commenting via the web, and my apologies in advance if the message shows up later. * > There are almost 500 occurrences of "is true". We can worry

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I pretty strongly dislike 'truthy' and 'falsey'. They look slangy and https://en.wiktionary.org/wiki/truthy gives the main meaning as (US, colloquial) Only superficially true; ... The computer language usage is credited to Javascript here and some other

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Vinay Sajip
Vinay Sajip added the comment: I also feel that lower case true and false are synonymous with any truthy and falsey values, as I'm sure many others do, so things in this area should in general stay as they are. Certainly -1 for a search-and-replace approach! -- nosy: +vinay.sajip

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16583 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17073 ___ Python tracker ___

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are almost 500 occurrences of "is true". -- ___ Python tracker ___ ___ Python-bugs-list

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Ammar Askar
Ammar Askar added the comment: I don't think the word "true" is really the issue here. It's the fact that "is" in this context is ambiguous, is it referring to the English "is" or the python operator `is`? -- ___ Python tracker

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not English expert, but traditionally "true" is used as a synonym of a truthy value everywhere in the Python documentation and code. There are almost 2000 occurrences. If it is a wrong word, it should be fixed in all these cases. -- nosy:

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-05 Thread Ammar Askar
Ammar Askar added the comment: I like Steven's "truthy value" or "true value" proposal. Another alternative: "x does not evaluate to true" "x does not evaluate to false" -- nosy: +ammar2 ___ Python tracker

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Since error messages aren't part of the API and backwards-compatibility doesn't apply to them, this could still go into 3.8. -- stage: resolved -> versions: +Python 3.8 -Python 3.9 ___ Python tracker

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm reopening this as an enhancement, because I think Mikeli is onto something here. I'd like to propose making the messages: "False is not a truthy value." "True is not a falsey value." to make it explicit that we are testing not for the

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: assertTrue() does not assert that the value is True. It asserts that it is true. For example, non-zero number or non-empty collections will pass the check. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: patch review -> resolved status:

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-05 Thread Mikeli Karotsieri
Change by Mikeli Karotsieri : -- keywords: +patch pull_requests: +16574 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17049 ___ Python tracker

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-05 Thread Mikeli Karotsieri
Change by Mikeli Karotsieri : -- pull_requests: -16573 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-05 Thread Mikeli Karotsieri
New submission from Mikeli Karotsieri : The error messages included in the exceptions raised when assertTrue and assertFalse fail are respectively: 'False is not true' 'True is not false ' This issue's goal is to find out if it would be more correct or/and beneficial for those messages