[petsc4py] What should be the 'default' communicator?

Barry Smith bsmith at mcs.anl.gov
Tue Aug 26 08:24:41 CDT 2008


On Aug 26, 2008, at 8:20 AM, Lisandro Dalcin wrote:

> On Tue, Aug 26, 2008 at 12:36 AM, Matthew Knepley  
> <knepley at gmail.com> wrote:
>> On Mon, Aug 25, 2008 at 8:13 PM, Barry Smith <bsmith at mcs.anl.gov>  
>> wrote:
>>>  Can you  not overload the assignment = to automatically call  
>>> whatever
>>> fancy setter you want to use? Then you get the simplicity I crave  
>>> and the
>>> safety you desire?
>>
>> Yes, you can make it a 'property'.
>
> No, No. 'property' works with instances of some class, but not with
> modules. This is a feature I miss from Python. You cannot 'hook' on
> attribute assignments in modules.

    This seems a fundamental stupidity of python. Why can't you make  
this PETSc thing
be a python class where the default_comm is a property?

    Barry

>
>
>
>
> -- 
> 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
>




More information about the petsc-dev mailing list