From: Thomas K. <th...@kl...> - 2012-09-03 10:00:26
|
On 26 August 2012 18:19, Michael Droettboom <md...@st...> wrote: > I understand the comments about the difficulty of introspection. The > reason it works the way it does is so that additional parameters can be > added to the artist layer without needing to update every single > plotting function. A real world example of this is when hatching was > added -- that feature only had to be added in one place and most artists > were able to use it. In that sense, I think this approach is very > beautiful in terms of code maintainability and extensibility. I'm jumping into this conversation a bit late, but from Python 3.3 it will be possible to set a __signature__ attribute on a function, using a Signature object which can be programmatically generated. So it should be possible, with a bit of legwork, to introspect pass-through parameters without having to manually declare them at the highest level. The details are here: http://www.python.org/dev/peps/pep-0362/ Thanks, Thomas |