[Cython] Test/example for cpdef enum

Robert Bradshaw robertwb at gmail.com
Tue Aug 5 01:48:43 CEST 2014


On Mon, Aug 4, 2014 at 4:14 PM, Ian Bell <ian.h.bell at gmail.com> wrote:
>
> On Sat, Aug 2, 2014 at 7:08 PM, Robert Bradshaw <robertwb at gmail.com> wrote:
>>
>> On Sat, Aug 2, 2014 at 3:56 AM, Ian Bell <ian.h.bell at gmail.com> wrote:
>> > Are there any tests/docs/examples showing how to use the cpdef enum?
>> > This
>> > is a feature I have been looking for for a long time and I am hoping to
>> > use
>> > it very soon in my own project.
>>
>> https://github.com/cython/cython/blob/master/tests/run/cpdef_enums.pyx
>> https://github.com/cython/cython/blob/master/tests/run/cpdef_enums.pxd
>
>
> I see.  Stupidly I had thought that it would be automatic in the sense that
> you don't have to manually declare which parameters will be output in the
> python module.  Evidently that is not the case, which I guess is ok.  I had
> hoped to avoid my script which parses my header and make a constants module.
> It works fine, its not the prettiest, but I guess I won't be saying goodbye
> to it any time soon.

Yeah, we don't have anything that looks at the actual .h/.c files yet.


More information about the cython-devel mailing list