Sean Gillies wrote: > Early on it seemed "nice" to let GIS users check for topological > equality using the == operator.
yes, that is "nice" > But it turns out that it's actually > harmful. More often, as Eric Lemoine showed me with the SQLAlchemy ORM, > we want to reserve that for testing the equality (within the > interpreter, non-topological) of Python objects. What does equality of python objects mean? William Waites wrote: > As I understand it, a == b means that a is the same object as b > (i.e. lives at the same address in memory) Nope. If you want the same object, you use: a is b a == b means they have the same value: >>> a = (1,2,3) >>> b = (1,2,3) >>> a == b True >>> a is b False -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
