[Cython] preferable way to replace a class

Brian Blais bblais at gmail.com
Tue Apr 7 20:48:51 CEST 2009


Hello,

I am writing a tool to do some neural simulation, where I have  
several different neuron groups, which are defined as python  
classes.  Is there a preferred way to write a cython-only replacement  
such that the end-user sees no difference?  What I mean is that they  
should be able to do:

import sim

n1=sim.NeuronGroup1(5)

sim.run_sim([n1])

and if the cython version exists, use that one (for both the neuron  
group and the function to run the simulation), otherwise use the  
python one.


		thanks,

			Brian Blais

--
Brian Blais
bblais at gmail.com
http://web.bryant.edu/~bblais

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/cython-dev/attachments/20090407/e3a31e91/attachment.htm 


More information about the Cython-dev mailing list