Hi Simon,

Thanks for your answer.

> > And the second errors occurs with the symbolic ring (example from
> > doctest)
> > {{{
> > sage: t = log(2)
> > sage: u = t.maxima_methods()
> > sage: SR(u)
> > Traceback (most recent call last):
> > ...
> > TypeError: Set_PythonType must be initialized with a type, not
> > Expression
> > }}}
>
> > Does anybody have any clue of what's happening ?
>
> I don't know about the first example, but here, we get:
>
>   sage: parent(u)
>   parent(log(2))
>   sage: type(parent(u))
>   <type 'sage.symbolic.expression.Expression'>
>   sage: issubclass(type(parent(u)),type)
>   False

Actually, the problem starts in the constructor of DefaultConvertMap
where it is written
{{{
if not PY_TYPE_CHECK(domain, Parent):
    domain = Set_PythonType(domain)
}}}
and we have
{{{
sage: t = log(2)
sage: isinstance(parent(t), Parent)
True
sage: u = t.maxima_methods()
sage: P = parent(u)
sage: P
parent(log(2))
sage: isinstance(P, Parent)
False
sage: type(P)
<type 'sage.symbolic.expression.Expression'>
}}}

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to