ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 03 Jul 2019 04:25:53 +0200Is it possible to subclass a sage class?https://ask.sagemath.org/question/34978/is-it-possible-to-subclass-a-sage-class/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? Wed, 28 Sep 2016 08:15:25 +0200https://ask.sagemath.org/question/34978/is-it-possible-to-subclass-a-sage-class/Comment by kcrisman for <p>I want to subclass the sage <code>Polyhedra</code> class. </p>
<p>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? </p>
https://ask.sagemath.org/question/34978/is-it-possible-to-subclass-a-sage-class/?comment=34981#post-id-34981Does this help? https://docs.python.org/2/tutorial/classes.html#inheritance Though if it's a Cython class it might be slightly more complicated.Wed, 28 Sep 2016 12:31:29 +0200https://ask.sagemath.org/question/34978/is-it-possible-to-subclass-a-sage-class/?comment=34981#post-id-34981Comment by John Palmieri for <p>I want to subclass the sage <code>Polyhedra</code> class. </p>
<p>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? </p>
https://ask.sagemath.org/question/34978/is-it-possible-to-subclass-a-sage-class/?comment=34984#post-id-34984It's not a Cython class: `Polyhedra_base` is defined in the Python file `src/sage/geometry/polyhedron/parent.py`.Wed, 28 Sep 2016 20:05:46 +0200https://ask.sagemath.org/question/34978/is-it-possible-to-subclass-a-sage-class/?comment=34984#post-id-34984Comment by Jesus Martinez Garcia for <p>I want to subclass the sage <code>Polyhedra</code> class. </p>
<p>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? </p>
https://ask.sagemath.org/question/34978/is-it-possible-to-subclass-a-sage-class/?comment=46999#post-id-46999Hi, @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: https://ask.sagemath.org/question/46995/wrapping-vector-class/Tue, 25 Jun 2019 22:15:51 +0200https://ask.sagemath.org/question/34978/is-it-possible-to-subclass-a-sage-class/?comment=46999#post-id-46999Comment by kcrisman for <p>I want to subclass the sage <code>Polyhedra</code> class. </p>
<p>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? </p>
https://ask.sagemath.org/question/34978/is-it-possible-to-subclass-a-sage-class/?comment=47048#post-id-47048Note that the question linked above has an accepted answer now, so people should go there if they find this question.Wed, 03 Jul 2019 04:25:53 +0200https://ask.sagemath.org/question/34978/is-it-possible-to-subclass-a-sage-class/?comment=47048#post-id-47048