math.nroot
George Sakkis
gsakkis at rutgers.edu
Mon Jul 4 14:23:48 EDT 2005
"Mike Meyer" <mwm at mired.org> wrote:
> "George Sakkis" <gsakkis at rutgers.edu> writes:
> > "Steven D'Aprano" <steve at REMOVEMEcyber.com.au> wrote:
> >
> >> But it doesn't make sense to say that two flags are equal:
> >>
> >> keep_processing = True
> >> more_reading_needed = True
> >> while more_reading_needed and keep_processing:
> >> get_more_records()
> >> process_records()
> >> if not keep_processing:
> >> print "User clicked Cancel"
> >>
> >> What does it mean to say that the flag done_processing
> >> is equal to the flag more_reading_needed? (That is not
> >> the same question as asking if the two flags have the
> >> same value.)
> >
> > Huh ? Equality *is* the answer to whether two "things" (flags or
> > whatever) have the same value or not.
>
> I think it seriously depends on what your "things" are.
It also depends seriously on what your _values_ are.
> For instance:
>
> length_in_meters = 1
> length_in_feet = 3.2808399
>
> The two variables clearly have different values. Yet they are also
> clearly equal - representing a distance of 1 meter, within tolerances.
>
> On the other hand:
>
> length_in_meters = 1
> time_in_days = 1
>
> These two variables clearly have the same value. Yet they aren't
> equal. In fact, comparing them is clearly an error.
Indeed, if the values are represented as plain numbers. In a different
formulation, values can be represented as unit numbers (e.g.
http://home.tiscali.be/be052320/Unum.html) as in
length_in_meters = 1 * M
length_in_feet = 3.2808399 * FT
These two values _are_ equal then.
George
More information about the Python-list
mailing list