Toblerity/Shapely — pull request #62 by kjordahl (2013-07-03 03:05:09+00:00)
Title: Implement operators analagous to uses by builtin set type

Overload the operators |, &, - and ^ to call the union, intersection, difference and symmetric_difference methods, respectively, the same as for a standard python `set`.

e.g.,
>>> from shapely.geometry import Point
>>> point = Point(0, 0)
>>> point2 = Point(-1, 1)
>>> point | point2

>>> point.union(point2).equals(point | point2)
True