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'>
}}}