Hi Joal,

On 26 Jan., 08:06, ancienthart <[email protected]> wrote:
> My current path of research involves giving the Matrix class a __getattr__
> method with argument *missing_method*, that returns a callable object. The
> callable object then returns the matrix result of .apply_map(lambda x:
> getattr(x,*missing_method*))
>
> Still having some fun ironing out the wrinkles though. There are some
> namespace issues.
>
> Anyone have any suggestions?

AFAIK, __getattr__ has a certain tendency to slow things down.
Moreover, if you return something where previously an attribute error
was raised then it is likely to break a lot of things.

Also note the following. According to what you state above, your plan
is that `M.simplify_full` returns the result of `M.apply_map(lambda x:
x.simplify_full)`. What is that output? Well, it is a matrix. But
'M.simplify_full` ought to be a method (or at least something
callable)!
Hence, what you want to return is not `M.apply_map(lambda x:
x.simplify_full)` but `lambda : M.apply_map(lambda x:
x.simplify_full)`.

However, I don't like to dispatch unknown attributes to attributes of
the marks of the matrix.

Cheers,
Simon

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to