[Pyrex] [PATCH] 'include' statements inside 'cdef class' level

Caio Marcelo cmarcelo at gmail.com
Mon Sep 3 23:46:09 CEST 2007


Allows including statements inside a 'cdef class' level from others
files, BUT they must be correctly indented.

(use option "-p3" in patch to apply it direct in Cython/Compiler directory).

For example, in python-etk we want

-----8<----
# file.pxi
cdef class (...)
    # note that without the patch, this would not be allowed
    include "other_file.pxi"
---->8----
# other_file.pxi (notice the indentation)
    def bla():
        pass
----8<----

Is this behaviour interesting for you?



Cheers,
  Caio Marcelo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyrex_include_class.patch
Type: text/x-patch
Size: 996 bytes
Desc: not available
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20070903/bc326d4a/attachment.bin 


More information about the Pyrex mailing list