Is it possible to subclass a sage class?

asked 2016-09-28 08:15:25 +0200

done_with_fish gravatar image

I want to subclass the sage Polyhedra class.

Basically, I have a bunch of functions I have written for polyhedra and I want to organize them in a class. Is this possible in sage?

edit retag flag offensive close merge delete


Does this help? Though if it's a Cython class it might be slightly more complicated.

kcrisman gravatar imagekcrisman ( 2016-09-28 12:31:29 +0200 )edit

It's not a Cython class: Polyhedra_base is defined in the Python file src/sage/geometry/polyhedron/

John Palmieri gravatar imageJohn Palmieri ( 2016-09-28 20:05:46 +0200 )edit

Hi, @done_with_fish did you manage to do this? I have no trouble doing it with Python classes, but struggle with Sage classes, see here:

Jesus Martinez Garcia gravatar imageJesus Martinez Garcia ( 2019-06-25 22:15:51 +0200 )edit

Note that the question linked above has an accepted answer now, so people should go there if they find this question.

kcrisman gravatar imagekcrisman ( 2019-07-03 04:25:53 +0200 )edit