[Pyrex] Possible bug with """

Greg Ewing greg at cosc.canterbury.ac.nz
Tue Apr 29 06:16:46 CEST 2003


"Edward C. Jones" <edcjones at erols.com> writes:

> There may be a bug in Pyrex involving triple quotes. "pyrexc wrapped.pyx"
> fails with the message ".../wrapped.pyx:7:4: Executable statement not
> allowed here".
> 
> cdef class A_Struct:
>      cdef int c_i
>      """
>      """

If that's meant to be a docstring, it has to be the
*first* thing in the block, e.g.

cdef class A_Struct:
  """
  This is a wrapper for A_Struct.
  """
  cdef int c_i

If you're trying to use it as a multi-line comment,
you're out of luck, I'm sorry. Use a real comment.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+




More information about the Pyrex mailing list