Bug or Feature?
eppstein at ics.uci.edu
Mon Nov 24 23:19:32 CET 2003
In article <mailman.1038.1069708528.702.python-list at python.org>,
"Delaney, Timothy C (Timothy)" <tdelaney at avaya.com> wrote:
> > >> subclasses of Set are closed under the set operations. :-)
> > >
> > > If you let Guido see that, it won't in 2.4 <wink>.
> > Could we please delete this thread? What have I done?
> The Right Thing(TM).
> "In the face of ambiguity, refuse the temptation to guess." (Go Tim Peters!).
It is very useful that ImmutableSet is closed under set operations.
By making the set operations copy the types of their arguments, the
author of sets.py was able to achieve this without duplicating each set
operation's implementation. If you don't like this behavior you can
always override it...
David Eppstein http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science
More information about the Python-list