← Back to team overview

ffc team mailing list archive

Re: [HG FFC] Cleanup in handling of command-line options. Everything is now put

 

2008/9/4 Anders Logg <logg@xxxxxxxxx>:
> On Thu, Sep 04, 2008 at 02:45:35PM +0200, Martin Sandve Alnæs wrote:
>> In the next generation SFC, I've split the options into three groups:
>> - output: verbosity, logging, cache directories, etc for debugging of
>> the form compiler itself
>> - code: anything that affects the generated code
>> - compilation: anything that affects how the code is compiled by jit
>>
>> This will be useful for the cache signatures, since the output options
>> won't change the form module signature. Potentially, I can cache
>> the generated code using just options.code in the signature,
>> and let instant cache the compiled modules using both
>> options.code and options.compilation in the signature.
>
> Nice. FFC will probably keep everything in one dictionary for a while
> (for convenience).
>
> --
> Anders

I'm also using a class ParameterDict(dict) which freezes entries
at construction time and allows access to items through attributes
named after like the keys:

p = ParameterDict(foo = 3, bar = "thing")
p.foo = 9
p["foo"] = 9
p.bar = "other"
for k,v in p.items():
    ...
p.blatti = 8 # Error!

--
Martin


References