[Pyrex] FAQ contribution (fwd)
John J Lee
jjl at pobox.com
Wed Jul 23 02:35:43 CEST 2003
John wrote:
[...]
> Q. Pyrex says my extension type object has no attribute 'rhubarb', but
> I know it does.
>
> A. Have you declared the type at the point where you're using it?
[...]
I still get these errors even in when the return (extension) type of a
cdef function is given. In that case the type should be known at compile
time, shouldn't it?
cdef class MyExtensionType:
cdef attr
...
cdef MyExtensionType foo():
return MyExtensionType()
cdef class AnotherExtType:
...
def blah(self):
met = foo()
foo.attr # Pyrex complains at runtime
John
More information about the Pyrex
mailing list