[Python-ideas] adding dictionaries

Stephen J. Turnbull stephen at xemacs.org
Tue Jul 29 02:16:08 CEST 2014


Alexander Heger writes:

 > It seems it would be valuable to parallel the behaviour of operators
 > already in place for collections.

Mappings aren't collections.  In set theory, of course, they are
represented as *appropriately restricted* collections, but the meaning
of "+" as applied to mappings in mathematics varies.  For functions on
the same domain, there's usually an element-wise meaning that's
applied.  For functions on different domains, I've seen it used to
mean "apply the appropriate function on the disjoint union of the
domains".

I don't think there's an obvious winner in the competition among the
various meanings.





More information about the Python-ideas mailing list