On Wed, Sep 3, 2008 at 12:45 PM, Hoyt Koepke <[EMAIL PROTECTED]> 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. > I ended up using an extension class w/ constructor to hold the options, > which I think is a better solution, Well, I'm not sure if that is a better solution. It seems suboptimal to have to create a new python instance just for the purposes of storing a bunch of paramenters. > > On Wed, Sep 3, 2008 at 6:38 PM, Lisandro Dalcin <[EMAIL PROTECTED]> wrote: >> Well, if that could be supported, perhaps it would be a good feature ;-). >> >> On Wed, Sep 3, 2008 at 12:10 PM, Dag Sverre Seljebotn >> <[EMAIL PROTECTED]> wrote: >>> Was this ever supposed to work, if so, what did it do? >>> >>> cdef struct A: >>> int a = 4 >>> >>> I have code to disallow it ready (raise compiler error) but then I >>> thought that perhaps it had a purpose (how else did Hoyt run into it...) >>> >>> http://trac.cython.org/cython_trac/ticket/64 >>> >>> -- >>> Dag Sverre >>> _______________________________________________ >>> Cython-dev mailing list >>> [email protected] >>> http://codespeak.net/mailman/listinfo/cython-dev >>> >> >> >> >> -- >> Lisandro Dalcín >> --------------- >> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) >> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) >> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) >> PTLC - Güemes 3450, (3000) Santa Fe, Argentina >> Tel/Fax: +54-(0)342-451.1594 >> _______________________________________________ >> Cython-dev mailing list >> [email protected] >> http://codespeak.net/mailman/listinfo/cython-dev >> > > > > -- > +++++++++++++++++++++++++++++++++++ > Hoyt Koepke > UBC Department of Computer Science > http://www.cs.ubc.ca/~hoytak/ > [EMAIL PROTECTED] > +++++++++++++++++++++++++++++++++++ > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
