← Back to team overview

dolfin team mailing list archive

Re: Reduce number of attributes in dolfin namespace (python)

 

On Sat, Mar 29, 2008 at 05:46:04PM +0100, Joachim B Haga wrote:
> Johan Hake <hake@xxxxxxxxx> writes:
> > On Saturday 29 March 2008 15:56:29 Anders Logg wrote:
> >> On Sat, Mar 29, 2008 at 02:42:24PM +0100, Joachim B Haga wrote:
> 
> >>> At the moment there are 546 attributes in the dolfin namespace (with only
> 
> >> You are right, there are too many things being imported. This is
> >> because we've been lazy and done import * in many places.
> 
> > But some of the pointed out names are imported from FFC, should we eg. place 
> > this in dolfin.ffc? In a demo or program you could then from dolfin.ffc 
> > import *. I would also suggest to modularize the actuall dolfin namespace 
> > too, a la the c++ modules, eg. put all mesh related things in dolfin.mesh 
> > aso.
> 
> Yes, ffc must also be part of such a clean-up. As for modularisation: it would
> be good as a next step, but I'm not planning it as part of the first patch
> because it will (probably) require too much change in current code.
> 
> -j.

Sounds good. Be very aggressive when pruning the namespace. We can
always add back the things that are missing one by one.

-- 
Anders


References