On Wed, May 20, 2009 at 9:15 PM, Greg Ewing <[email protected]> wrote:
> Stéfan van der Walt wrote:
>> As is, I can simply define all those "classmethods"
>> outside a class structure, but I thought it would be more elegant to
>> have them combined under one roof.
>
> Is there some reason that a module is not a
> suitable kind of "roof" to put them under?
>
IMHO, factory methods are good candidates for classmethod's. And of
course, if you are trying to emulate a C++ API for using in Python (as
I do in mpi4py), you may be "forced" to use {static|class}method's,
just because you want to mimic the C++ API as much as possible.
--
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