On Mon, Jun 12, 2017 at 3:41 PM, Nils Bruin <[email protected]> wrote: > On Monday, June 12, 2017 at 10:44:57 AM UTC-7, Daniel Krenn wrote: >> >> >> If not sorted, should the output data structure be a Python set instead >> of a list? > > Conceptually it's a set, but for efficiency reasons it shouldn't be a Python > set. The extraneous hashing and equality testing is a waste (and the > returned data types shouldn't be guaranteed to be hashable, e.g. p-adics. In > fact, floats aren't really hashable either, even if hashing them doesn't > return an error).
<Aside> What is your definition of "hashable"? I always thought of hashable as basically synonymous with "immutable", except for issues of efficiency. Aren't floating points numbers at least immutable, even if there are various other issues with them? -- William </Aside> > So I'd say a list is still the appropriate data type to > implement this with. > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- William (http://wstein.org) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
