Hi! In the last few minutes, I hacked something that provides the following:
sage: ZZ.set_custom_doc('I like this text better.') sage: ZZ? Type: IntegerRing_class Base Class: <type 'sage.rings.integer_ring.IntegerRing_class'> String Form: Integer Ring Namespace: Interactive File: /mnt/local/king/SAGE/sandbox/sage-4.7.2.alpha2/local/ lib/python2.6/site-packages/sage/categories/euclidean_domains.py Definition: ZZ(self, x, *args, **kwds=0) Docstring: I like this text better. Constructor information: Definition: ZZ(self) My patch does not add slots beyond what is done in #11115, it works for all parents (sage.structure.parent.Parent) and it works for any SageObject with writeable attributes. However, it does not work for things like symbolic expressions, since they do not allow to write attributes: sage: x.set_custom_doc('x denotes altitude') --------------------------------------------------------------------------- TypeError Traceback (most recent call last) ... TypeError: Setting custom documentation requires attribute access In particular, it would not provide what the OP requested. Question: Shall I open a ticket and post a patch, or is my suggestion not good enough for being called "a feature"? Best regards, Simon -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org