#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:9 nthiery]:
> I guess it's fair enough to write in the specifications of the protocol
that __init_extra__ shall be a method.
You'll have to be careful how you formulate that: `cdef` classes can have
methods too (some custom cython object of course) and their unbound
versions specifically call themselves "method" and have no `__func__`
attribute. They are callable, though, further suggesting one should
probably check if the attribute is callable and if not, see if there is a
__func__ attribute that is callable (or some safe permutation of this that
performs better)
> And if some day we have a serious use case (which I kind of doubt), it
will always be time to generalize the protocol.
Famous last words... I've seen many cases happen in sage where little
design issues (which, at the time perpetrated seemed perfectly reasonable)
lead to weird, unforseen and silent failures. The problem this ticket is
trying to fix is one of them.
--
Ticket URL: <http://trac.sagemath.org/ticket/15718#comment:10>
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.