On May 23, 2011, at 12:49 PM, Mateusz Paprocki wrote:

> Hi,
> 
> On 23 May 2011 20:46, Aaron S. Meurer <asmeu...@gmail.com> wrote:
> 
> On May 23, 2011, at 12:40 PM, Chris Smith wrote:
> 
> > Aaron S. Meurer wrote:
> >>> 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?
> >>>
> > If you have `solve([x+y-3,x-y-1])` you need an unambiguous way to return 
> > the tuples if you aren't going to return the results with the symbols. You 
> > could get set([Tuple(1, 2)]) or set([Tuple(2, 1)]) so you need a way to 
> > internally send back something unambiguous.
> >
> 
> I think it should just return the result with the symbols.
> 
> Or use sorted_key to get hash independent ordering.

Even then, it isn't clear at all to the user what refers to what.  I think we 
should return a dictionary.  

Aaron Meurer

>  
> 
> 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.
> 
> 
> Mateusz
> 
> -- 
> 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.

-- 
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.

Reply via email to