On Thu, Sep 16, 2010 at 11:06 PM, John H Palmieri <jhpalmier...@gmail.com> wrote: > On Sep 16, 12:10 am, Tom Boothby <tomas.boot...@gmail.com> wrote: >> > I find the generic version of the function definitions less than >> > satisfactory. I'd guess it would be had to make Sphinx pickup the >> > more detailed info in these situations? I'd also guess the decorators >> > could maybe manipulate the docstring and inject some information based >> > on the arguments of the decorator? Either way, could the effect of >> > these decorators on the documentation be improved? >> >> Yes, that is possible -- decorators already have to "steal" >> documentation from whatever they decorate. I think that we should >> require decorators to document their existence and effect. > > I don't know if this is the same issue, but I think I've also seen the > @CachedFunction decorator hide documentation: if you have > > �...@cachedfunction > def bozo(...): > > Then bozo doesn't appear in the reference manual. I've considered > doing > > def bozo_(...): > > bozo = CachedFunction(bozo_) > > Then bozo_ appears in the ref manual and bozo is what you actually > call. But it's annoying. > > -- > John > > -- > 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 >
Perhaps changing the decorators to make use of the decorator package (http://micheles.googlecode.com/hg/decoratior/documentation.html and http://pypi.python.org/pypi/decorator), which preserve call signatures and docstrings, would help? -- Tim Joseph Dumol <tim (at) timdumol (dot) com> http://timdumol.com -- 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