2008/12/3 Anders Logg <[EMAIL PROTECTED]>: > On Wed, Dec 03, 2008 at 12:24:38PM +0100, Martin Sandve Alnæs wrote: >> 2008/12/3 Anders Logg <[EMAIL PROTECTED]>: >> > Another thing I've been wondering about is the renaming of >> > dolfin::Function to dolfin.cpp_Function. Is this really necessary? >> > >> > If we just removed the renaming, I guess it would still work out. So >> > we would create classes in function.py that inherit from ffc.Function >> > and dolfin.Function (instead of dolfin.cpp_Function). >> >> How? > > By just writing dolfin.Function instead of dolfin.cpp_Function in > function.py. > > In function.py, we import the SWIG-generated module "dolfin": > > import dolfin; > > This module may then contain a class named "Function" which is the > SWIG-generated wrapper for dolfin::Function (currently named > cpp_Function). We may then define a class named "Function" in the > function.py module, and this is the class that we import in the > top-level __init__.py (not the one from dolfin.dolfin). > > Does it make sense?
So you mean dolfin.dolfin.Function == dolfin.cpp_Function dolfin.Function is a subclass of dolfin.dolfin.Function ? How does this make anything clearer? It only obfuscates what's being done, creates another namespace issue, and makes it even more difficult to talk about functions in dolfin. -- Martin _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
