Eric Firing <efir...@hawaii.edu> writes:

>> The current pyplot wrappers all have an argspec of (*args, **kwargs),
>> which means that any interactive tools that show the possible arguments
>
> 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.

You're right, it would be better to generate it at build time. One
problem with this is that my version of boilerplate.py needs to import
axes.py to access the methods of the Axes class, and axes.py in turn
imports other things, making it impossible to run boilerplate.py without
having compiled the compilable modules. That's why I munge sys.path
before importing axes -- and there are lots of things that could go
wrong with that.

I guess a more correct approach would be to use something like the
parser module to read axes.py without executing the code.

>> 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

That looks like it could work -- the memoize example seems to be pretty
close to our wrapping needs. I'll spend some time thinking about this
later. Thanks for the link!

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


------------------------------------------------------------------------------
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

Reply via email to