---------- Forwarded message ----------
From: Simon King <[EMAIL PROTECTED]>
Date: Oct 18, 2007 1:19 PM
Subject: Re: cimport of extension classes?
To: sage-newbie <[EMAIL PROTECTED]>



Dear Sage team,

sorry for asking my question: meanwhile i found the answer in another
sage documentation.

Rather than
> - in foo.pyx:
> cdef public class Foo:
>     <lots of definitions>
> - in foo.pxd:
> cdef extern class Foo
> - in Module.pyx:

i had to do

- in foo.pyx:
cdef class Foo:
    <lots of def's, but no cdef's>
- in foo.pxd:
cdef class Foo:
    <cdef's, but no def's>

and then
> cimport foo
> <lots of code referring to foo.Foo>
works perfectly.

Yours
     Simon





-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to