Numeric Function In Python Boolean Expression