as reported here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597848
if you compile:
def foo():
"bar"
return 42
del foo
using new cython, you get after importing it:
>>> import a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "a.pyx", line 1, in init a (a.c:505)
def foo():
AttributeError: 'module' object has no attribute 'foo'
however, if you remove the docstring "bar", it works:
>>> import a
>>>
and in Python, it works both ways. I don't know why anyone would want
to delete a function like that, but in any case, I guess that's a
regression.
Ondrej
I wonder if this has to do with the auto test dict (which is generated
at runtime). I thought that went in a bit ago though. I'll look into
this. Thanks for the report.
- Robert
No, I haven't yet.
Could you add the line below to the top level of your pyx source?:
#cython: autotestdict=False
For example, take a look here:
http://code.google.com/p/mpi4py/source/browse/trunk/src/mpi4py.MPI.pyx#4
> On Sep 28, 8:04 pm, Robert Bradshaw <rober...@math.washington.edu>
> wrote:
>> > as reported here:
>> >http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597848
>> I wonder if this has to do with the auto test dict (which is generated
>> at runtime). I thought that went in a bit ago though. I'll look into
>> this. Thanks for the report.
>
--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169