"Mike Meyer" <[EMAIL PROTECTED]> wrote: > "George Sakkis" <[EMAIL PROTECTED]> writes: > > "Steven D'Aprano" <[EMAIL PROTECTED]> 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 -- http://mail.python.org/mailman/listinfo/python-list