[Numpy-discussion] Questions on error handling/refcounting in some ufunc object loops.
Charles R Harris
Fri Nov 14 01:12:13 CST 2008
On Thu, Nov 13, 2008 at 11:50 PM, Robert Kern <email@example.com> wrote:
> On Fri, Nov 14, 2008 at 00:39, Charles R Harris
> <firstname.lastname@example.org> wrote:
> > BTW, David, would you mind if I moved the rest of the function
> > into math_c99? I would like to separate the loops from the functions. It
> > might also be nice to have a template somewhere to combine all the code
> > pieces. Having includes scattered here and there through the code is a
> > obscure.
> Ah, the T-word. :-)
> Have you taken a look at Tempita?
> It's a small, single-file implementation, and its syntax is Djangoish
> but it doesn't have some of Django's limitations that make Django
> templates awkward for code generation. In particular, you can use
> pretty much arbitrary Python in the template and don't have to
> register a new tag just to call an arbitrary function. If you want to
> use Tempita to redo our code generation, I withdraw my old objections.
I'm actually pretty happy with the current system now that it has nested
loops and continuation lines. It's small and does no more than it needs to.
Capitalization is the only additional feature that catches my attention now
days, but it doesn't move me enough to do anything about it.
Anyway, I was thinking more along the lines of the text api lists we have.
math_c99.c.src : generate
umathmodule.c.src : generate
Something like that, anyway. It would be easier than grepping through the
source or putting a list in some obscure setup.py file. Yes, scons and setup
can be made to do these things, I just think it would be nice to separate
the data from the code. Although I suppose such a file is actually an
example of domain specific code.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion