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 >