Re: [Python-ideas] universal set object for use in set manipulation

[Andy Kish]
-1 This complicates the API and the implementation for very little benefit (saving you from writing a tiny, clear helper function for an uncommon use case). Currently, sets enjoy a near zero learning curve. That would be lost by adding set.universal() whose semantics are not immediately obvious -- for example, with s=set.universal() what is the meaning of list(s) or frozenset(s) or s.pop(); what is its repr value; and what is s^set('abc') or s-set('abc') or other operations? You may be able to come-up with definitions that work, but those won't be intuitive to most users. Raymond

-.5 You'd have to come up with an entire system for infinite sets for this to work, for the reasons Raymond pointed out. You'd also have to be able to define what the universe is, integers, strings, strings of length x, etc. -Michael Lenzen On 07/23/2009 05:40 PM, Raymond Hettinger wrote:

-.5 You'd have to come up with an entire system for infinite sets for this to work, for the reasons Raymond pointed out. You'd also have to be able to define what the universe is, integers, strings, strings of length x, etc. -Michael Lenzen On 07/23/2009 05:40 PM, Raymond Hettinger wrote:
participants (2)
-
Michael Lenzen
-
Raymond Hettinger