Joachim Durchholz wrote: >> >>> It's worth noting, too, that (in some sense) the type of an object >>> can change over time[*]. >> >> No. Since a type expresses invariants, this is precisely what may >> *not* happen. > > No. A type is a set of allowable values, allowable operations, and > constraints on the operations (which are often called "invariants" but > they are invariant only as long as the type is invariant).
The purpose of a type system is to derive properties that are known to hold in advance. A type is the encoding of these properties. A type varying over time is an inherent contradiction (or another abuse of the term "type"). - Andreas -- http://mail.python.org/mailman/listinfo/python-list