neg_or_pos isneg_or_pos
is a terrible function name.
A function name should generally be a verb or a verbal phrase. And, even if you made it a predicate as "is_neg_or_pos" it is_neg_or_pos
it should always return True True
, as the fraction surely is negative or positive.
By making it is_negative or is_positive is_negative
or is_positive
, you make your code a lot clearer. I would not know what a True result True
result from is_neg_or_pos meant is_neg_or_pos
meant without reading the source, and predicate methods are generally really straightforward.
neg_or_pos is a terrible function name.
A function name should generally be a verb or a verbal phrase. And, even if you made it a predicate as "is_neg_or_pos" it should always return True, as the fraction surely is negative or positive.
By making it is_negative or is_positive, you make your code a lot clearer. I would not know what a True result from is_neg_or_pos meant without reading the source, and predicate methods are generally really straightforward.
neg_or_pos
is a terrible function name.
A function name should generally be a verb or a verbal phrase. And, even if you made it a predicate as is_neg_or_pos
it should always return True
, as the fraction surely is negative or positive.
By making it is_negative
or is_positive
, you make your code a lot clearer. I would not know what a True
result from is_neg_or_pos
meant without reading the source, and predicate methods are generally really straightforward.