On May 22, 2011, at 9:31 PM, Renato Coutinho wrote: > On Mon, May 23, 2011 at 12:28 AM, Mateusz Paprocki <matt...@gmail.com> wrote: >> Hi, >> >> On 23 May 2011 05:18, smichr <smi...@gmail.com> wrote: >>> >>> Will list(e.free_symbols) be OS independent? >> >> .free_symbols is implemented using sets so it is platform (hash) dependent >> (I mean order of elements). > > But sets don't have any ordering (except for printing or iterating, > but you shouldn't use it). I think sorted(list(e.free_symbols)) should > be safe. > > Cheers, > Renato
No, sorted uses __le__, which for symbols uses the hash, so that too will be platform dependent (granted it's better than list(set), which might return a different thing within the same session). Why do you need to have a list instead of a set? Aaron Meurer -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.