<div dir="ltr"><div class="gmail_quote">On Sun Feb 08 2015 at 12:52:56 AM Chris Angelico <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">To be quite honest, I would be very happy if sets had more of the<br>
operations that dictionaries have. Imagine if "set" were "dictionary<br>
where all the values are True", and "OrderedSet" were "OrderedDict<br>
where all the values are True"; combining sets is like combining<br>
dictionaries, but you don't have to worry about merging the values.<br></blockquote><div><br></div><div>I think they already have most of the useful ones. Adding True values seems unnecessary, to me—that entries have no value seems more appropriate in terms of merging them making sense.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ISTM ordered set addition/union should be like list concatenation with<br>
duplicates dropped.</blockquote><div><br></div><div>I agree about addition - that'd mirror list concatenation nicely. But with that in mind, making union do the same thing seems wrong - partly because it'd be an exact duplicate of other functionality, and partly because it's a special case:<br></div><div><br></div><div>- `set | set` has no meaningful ordering</div><div>- `orderedset | set` has no meaningful ordering</div><div>- `set | orderedset` has no meaningful ordering</div><div>- `orderedset | orderedset` has a meaningful ordering if you expect union to act like update(). Maybe that's more common than I thought; I always considered them fundamentally different concepts.</div><div><br></div><div>Ed Kellett</div><div> </div><div><br></div></div></div>