Hi,

On 13 October 2011 19:29, Chris Smith <[email protected]> wrote:

> 2011/10/14 Aaron Meurer <[email protected]>:
> > I didn't look into it, but my guess is that the log is only expanded
> > if the expansion hints are hit on the expression in a particular
> > order.  Unfortunately, we still have in Expr.expand:
> >
> > for hint, use_hint in hints.iteritems():
> >    <expand>
> >
> > where hints is a dictionary of the hints.  But the order of
> > dict.iteritems() is *completely* arbitrary, and as far as I know isn't
> > even guaranteed to be the same for the exact same dictionary within
> > the same session.
> >
> And I had the same problem with unrad. Pehaps we need the equivalent
> of 'sorted' that can be used easily. I am still a little confused
> about which key to use (default_sort_key, Basic.compare, etc...). That
>

Don't use Basic.compare or similar. They will be gone in 0.7.3 (hopefully).


> way, when something from an unordered iterable is processed, it can
> quickly be made canonical.
>

Sorting expressions and ordering options are two different things. The first
should be done with sort_key() (or default_sort_key()). For the other one
can use options module from polys, although a few improvements will be
necessary to make it useful for expand(), and they would have to be moved
out of polys. The minimum is to specify relationships between various hints
to expand() and use use topological sort to order them (which is what is
done in options in polys, but the purpose is a little different). In polys
options are processed in lexicographic order, unless there is explicit
ordering between options (you can specify `after` and `before` attributes on
any option). For example `auto` flag has to be processed after processing of
any domain related option (`field`, `domain`, `extension`, ...) to disable
automatic domain manipulation if user specified domain or domain parameters
explicitly.


>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to