Hi Nils, On 16 Sep., 20:17, Nils Bruin <nbr...@sfu.ca> wrote: > Reasonable options. For me, "...?" is an *introspection* tool, so it > helps me seeing what things look like to sage.
Not always. For example: If you have a cached method (such as groebner_basis of multivariate polynomial ideals) then you want to see the documentation respectively the code of the underlying groebner_basis method, but not the doc/code of sage.misc.cachefunc.CachedMethodCaller (which is the actual class which groebner_basis is instance of). > For your two concrete proposals: > > Does that mean extra slots on Parent and Element? I don't know if it could be called a "slot" (if I am not mistaken, that's a technical notion). But yes, it would involve a new cdef attribute. > In that case, -1. Understandable. > On the other hand, if these have a dict > already anyway, then there's no such issue. They haven't. > This has problems with garbage collection: Custom docs would never get > reclaimed, so this would effectively create a memory leak... Indeed. For the record: I did not claim that my two suggestions are good suggestions. But I did not see another way of providing a *general* framework for providing instances (not sub-classes!) with a custom doc string. 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