EXOR or symmetric difference for the Counter class

Paddy paddy3118 at googlemail.com
Tue Aug 17 18:46:17 EDT 2010


On Aug 17, 2:29 am, Raymond Hettinger <pyt... at rcn.com> wrote:

> I would like to see someone post a subclass to the ASPN Cookbook that
> adds a number of interesting, though not common operations.  Your
> symmetric_difference() method could be one.  A dot_product() operation
> could be another.  Elementwise arithmetic is another option (we
> already have add and subtract, but could possibly use multiply,
> divide, etc).  Scaling operations are another possibility (multiple
> all elements by five, for example).
>

>
> Raymond

Sample code is at http://code.activestate.com/recipes/577362-extension-to-python-3-counter-class/



More information about the Python-list mailing list