On Fri, 27 Oct 2006 18:22:28 +0000, Antoon Pardon wrote: >>> And how do I express that a number has to be greater than >>> 100 into a Nothing vs Something dichotomy? Declare all >>> greater numbers as Something and the rest as Nothing? >> >> Well, would you declare numbers less than 100 False? > > No but the condition: x > 100, will map all numbers to > either True or False. Can you provide a condition that will > provide a mapping to Nothing and Something? Without > artificially mapping False to Nothing and True to Something?
A > B maps to max(0, A-B) or more verbosely, "Remove B items from A items, stopping when there are no more items to remove. What is left over? Something or Nothing?" Likewise, A < B maps to max(0, B-A). -- Steven. -- http://mail.python.org/mailman/listinfo/python-list