Attribute and method calling#
- class sage.misc.call.AttrCallObject(name, args, kwds)#
- sage.misc.call.attrcall(name, *args, **kwds)#
Return a callable which takes in an object, gets the method named name from that object, and calls it with the specified arguments and keywords.
name- a string of the name of the method you want to call
args, kwds- arguments and keywords to be passed to the method
sage: f = attrcall('core', 3); f *.core(3) sage: [f(p) for p in Partitions(5)] [, [1, 1], [1, 1], [3, 1, 1], , , [1, 1]]