On Thu, Mar 29, 2012 at 07:50:31PM -0400, msh...@math.vt.edu wrote:
> I need to call the Coxeter group method something different
> like reflection_inversions (and the solution becomes trivial)

alternative name: inversions_as_reflections

> or someone needs to tell me how to tell python not to run over
> the Coxeter group method (so the method is actually available to
> the instantiated class) and how to access it syntactically.
> Both methods live in abstract classes.

Does this answer your question?

    class A(object):
        def f(self): print "I am A.f"

    class B(A):

        def f(self):
            super(B, self).f()
            print "I am B.f"

    sage: A().f()
    I am A.f
    sage: B().f()
    I am A.f
    I am B.f

See http://docs.python.org/library/functions.html#super for more on super.

So, the following should work in WeylGroups.ElementMethods:

        def blah(self):
            result = super(WeylGroups().element_class, self).blah()
            do something with that result ...

I would rather use ``super(WeylGroups.ElementMethods,self)'' but that
does not work.

Cheers,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to