#15718: Implement the __init_extra__ protocol of categories for Cython classes.
------------------------------+------------------------
       Reporter:  nthiery     |        Owner:
           Type:  defect      |       Status:  new
       Priority:  major       |    Milestone:  sage-6.1
      Component:  categories  |   Resolution:
       Keywords:              |    Merged in:
        Authors:              |    Reviewers:
Report Upstream:  N/A         |  Work issues:
         Branch:              |       Commit:
   Dependencies:              |     Stopgaps:
------------------------------+------------------------

Comment (by nbruin):

 Replying to [comment:7 SimonKing]:
 > I just tested: When one empties the coercion cache and the
 coerce_from_list, then calling `C.__init_extra__.__func__(R)` will fill it
 again, which is its purpose. So, it works without binding.

 Well ... that works when `C.__init_extra__` is an unbound method that has
 a `__func__` attribute. Likely all unbound methods do, so you've probably
 dealt with the case that `__init_extra__` is an unbound method. But
 attributes aren't necessarily! I think only unbound methods bind when
 called as attributes on instances. Other objects just get called. But
 that's a case you should test for if you want this to be properly
 compatible with python's inheritance. Unbound methods aren't the only
 things that lead to callable attributes on instances.

--
Ticket URL: <http://trac.sagemath.org/ticket/15718#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to