GNOME Bugzilla – Bug 470230
check for default value in boolean type is wrong
Last modified: 2007-08-27 13:13:14 UTC
Please describe the problem: the check (default is not True or default is not False) is always true, even for True or False Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 94318 [details] a simple test
Created attachment 94319 [details] [review] a simple patch
(In reply to comment #2) > Created an attachment (id=94319) [edit] > a simple patch > Looks good, can you add a test?
AFAIK, not in uses == for comparison. While this is hardly important, maybe it is better to use "default is not True and default is not False" still.
>>> 1 in (True, False) True
Created attachment 94320 [details] [review] this is a patch test for tests/test_properties.py
>>> bool.__bases__ (<type 'int'>,)
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.