[Cython] del command

Prashant Saxena animator333 at yahoo.com
Fri Feb 18 06:46:53 CET 2011


python 2.6.6
xp, mac, linux

When I am using "del" command in my scripts and compiling using pure python 
mode, I am getting an error:

"Deletion of local or C global name not supported"

There are couple of places where I have to delete an object. I am using a hack 
to solve this but I am not sure it's correct way.

In a simple python script (delobj.py), I am writing a function:

def deleteObject(obj):
    del obj

I am importing this script in all the scripts I am compiling using cython and 
there I am using:


this is working fine and no errors.

Is this is the correct way?



More information about the cython-devel mailing list