>Really, bool(x) means known_true(x). >And of course, not(known_true(x)) >is not the same as known_false(x).
Sure, but adequate naming is crucial, too. Also the design as is does not prevent a developer from applying boolean operations (negating, and,or,...) by accident on the result. A similar real world example is the 'size()' function in Singular. That function omits zero ideal generators (is documented), but many devs (incorrectly) use size() to iterate over ideal generators. There are alone about 40-80 size()-related bugs in Singular (see https://github.com/Singular/Sources/issues/611). And the 'bool()' documentation does even not explicitly explain the 'false' return value case. With 'bool()' as is only the bughunters (like me) will have fun. I' looking forward to find many related bugs ;-) Jakob Am Mittwoch, 13. Mai 2015 13:40:37 UTC+2 schrieb Samuel Lelievre: > > > > 2015-05-12 21:03:27 UTC+2, Jakob Kroeker: > > > > > Its just behaving as specified, False means "cannot decide" > > > I find, this was a pretty unfortunate specification. > > I think it would be kind of ok in case 'bool()' would be > > named 'Holds_If_True_Otherwise_Unknown()' instead > > Really, bool(x) means known_true(x). > And of course, not(known_true(x)) > is not the same as known_false(x). > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.