Yes, but my problem is that I am inheriting in a file and that is not
working at the moment. I did in the command line to show the error, but
actually I cannot make it work on a simple file:

I have a file containing only this:

from sage.categories.graded_algebras import GradedAlgebras

class Facade_polynomial_ring(GradedAlgebras):
    pass

And when I import Facade_polynomial_ring on the command line and try to
construct it, it doesn't work. Same if I try to construct
Facade_polynomial_ring in another file (which was I was trying to do).

Best

Viviane

2015-06-11 13:06 GMT-05:00 Travis Scrimshaw <[email protected]>:

> Hey Viviane,
>    I suspect what is going on is by constructing an instance of
> GradedAlgebras, various magic of the category framework is being
> initialized (and is cached on the class), and so when it's used after that,
> it then doesn't have to find a particular path for the printing magic and
> thus it works...
>
> Although I think inheriting from a category like (and on the command line
> than in a static file) that is an abuse of the category framework, or at
> least wasn't designed so much for that.
>
> Best,
> Travis
>
>
>
> On Thursday, June 11, 2015 at 8:52:19 AM UTC-7, Viviane Pons wrote:
>>
>> Hi everyone,
>>
>> I'm trying to inherit from GradedAlgebras, but for some reason I hit a
>> "maximum recursion depth" exception.
>>
>> More precisely, this does not work:
>>
>> sage: class T(GradedAlgebras):
>>     pass
>> ....:
>> sage: T(QQ)
>>
>> whereas, this does:
>>
>> sage: GradedAlgebras(QQ)
>> Category of graded algebras over Rational Field
>> sage: class T(GradedAlgebras):
>>     pass
>> ....:
>> sage: T(QQ)
>> Category of graded algebras over Rational Field
>>
>> I'd like to understand why and I would like to understand what to do to
>> make it work without creating a useless instance of GradedAlgebras first.
>>
>> Best
>>
>> Viviane
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to