[Cython] Initializing var to struct?

Dag Sverre Seljebotn dagss at student.matnat.uio.no
Wed Sep 3 18:24:03 CEST 2008


Lisandro Dalcin wrote:
> On Wed, Sep 3, 2008 at 12:45 PM, Hoyt Koepke <hoytak at cs.ubc.ca> wrote:
>> I wanted to have a single structure that holds a bunch of option
>> parameters for my algorithm.  This structure would get passed around
>> between some of the functions, and some of the particular options are
>> in the inner loop of things and so I wanted access to be quick.  I
>> wanted to put the defaults in the structure definition and then allow
>> the user to change them if needed after creating the structure.
> 
> That's a very valid and useful use case.

Yes, but there's no lack of those :-) And for me personally stuff like 
accessing complex numbers in a NumPy array, or inner functions and 
"yield" definitely has a higher priority. So I'll just mark it as a 
syntax error; then someone else can come along and provide a better 
solution later...

Hoyt: Thanks for the report!

-- 
Dag Sverre


More information about the Cython-dev mailing list