Changes between Version 7 and Version 12 of Ticket #9944

03/30/11 06:23:00 (11 years ago)

Replying to SimonKing:

Aparently there is a doctest failure. I fixed it, but unfortunately it went into my patch submitted for #9138. Therefore, "needs work".

Strange: Although the patch bot did see that error in one run, I can not reproduce it (but I had to change that test in my patch for #9138, because it turns QQ['x'].category() into the join of the category of euclidean domains and commutative algebras over QQ.

The other issue, namely the performance loss, was studied on sage-devel.

Florent Hivert found that a long mro does not matter for Python, but it does matter if the classes inherit from a cdef class. That is the case for most classes in Sage (inheriting from SageObject), so, we should address the problem of a long mro.

Eventually, that should be fixed in Cython (and I think Florent reported it upstream). But for now, it seems to me we should think of a work-around.

Would it be acceptable coding practice to explicitly state in a derived class (say, MPolynomialRing_generic), that frequently used methods such as base or base_ring are the same as Parent.base or Parent.base_ring? David Roe stated that it might be dangerous to do so, at least if cpdef methods are involved.


  • Ticket #9944

    • Property Status changed from needs_review to needs_work
    • Property Work issues changed from to Fix one test
  • Ticket #9944 – Description

    v7 v12  
    44  1. [attachment:9944-poly-cat.patch]
    55  2. [attachment:9944-poly-cat-doctests.patch]
    6   3. [attachment:9944-poly-cat-review.patch]
     6  3. [attachment:trac-9944-poly-cat-review.patch]