#14214: Cythoned homsets
----------------------------------------------+-----------------------------
Reporter: SimonKing | Owner: tbd
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.10
Component: performance | Resolution:
Keywords: Hom, cython, cached method | Work issues: How to store
domain and codomain?
Report Upstream: N/A | Reviewers:
Authors: Simon King | Merged in:
Dependencies: #14159, #12951, #13184 | Stopgaps:
----------------------------------------------+-----------------------------
Comment (by SimonKing):
This is `Parent.__getattr__`:
{{{
def __getattr__(self, str name):
if (name.startswith('__') and not name.endswith('_')) or
self._category is None:
dummy_error_message.cls = type(self)
dummy_error_message.name = name
raise dummy_attribute_error
try:
return self.__cached_methods[name]
except KeyError:
attr = getattr_from_other_class(self,
self._category.parent_class, name)
self.__cached_methods[name] = attr
return attr
except TypeError:
attr = getattr_from_other_class(self,
self._category.parent_class, name)
self.__cached_methods = {name:attr}
return attr
}}}
So, it 'should' be possible to get the argument from `__cached_methods`,
isn't it?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14214#comment:35>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.