Jouni K. Seppänen wrote: > The current pyplot wrappers all have an argspec of (*args, **kwargs), > which means that any interactive tools that show the possible arguments > will not be able to show anything very useful for the wrapped functions. > Also, since the docstrings are generated dynamically, any static code > analysis tools will not see them.
Jouni, This looks like a very good idea. It is in some ways a separate change, but it would be nice if the boilerplate were generated at build time, and/or generated as a separate file from which pyplot.py would import everything. I don't like having a single file that is partly hand-edited and partly machine-generated. > -- > > Since we only support Python >=2.4 now, we could get rid of the whole > boilerplate code system and replace it with something more dynamic as > envisioned in > > http://groups.google.com/group/comp.lang.python/browse_frm/thread/dcd63ec13096a0f6/1b14640f3a4ad3dc?#1b14640f3a4ad3dc > > but I don't see any way of keeping the wrapped function's argspec > without doing something much like what we do now. > Have you looked at the decorator module? http://pypi.python.org/pypi/decorator Eric ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel