[Python-3000] how about switching to a preprocessor? (Re: A better way to initialize PyTypeObject)

Guido van Rossum guido at python.org
Sat Dec 2 19:11:33 CET 2006


I'd love to see this idea explored; it sounds like it might well be
the right solution. (It's also an extension of the "separate tool for
conversion" idea that I floated earlier.)

One requirement: it should be possible to resume development and the
preprocessor at any time. I don't like tools that generate code once
which you then continue to develop manually. (Numeric Python's history
has a good anti-pattern example of this.)

On 12/2/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
> Marcin 'Qrczak' Kowalczyk wrote:
>
>  > "Guido van Rossum" <guido at python.org> writes:
>  >
>  >> - Can't we require a C99 compiler and use C99 struct initialization?
>  >> Then the table lines could look like
>  >>
>  >>   tp_new = Noddy_new,
>  >>   tp_init = Noddy_init,
>  >
>  > The C99 syntax is:
>  >
>  >     .tp_new = Noddy_new,
>  >     .tp_init = Noddy_init,
>
> I'm beginning to wonder if a preprocessor isn't the right way to get
> around both the syntax issues related to type objects, and also a bunch
> of other issues that keep cropping up if you're doing serious extension
> development (better code generation for ParseTuple is one of those).  a
> preprocessor would also give us more leeway to tweak the Python/C glue
> layer in future releases.
>
> if done right, the preprocessor would only be required during module
> development; not by people building C extensions.
>
> </F>
>
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list