[SAGA-RG] SAGA attributes as Python dictionaries?

Steve Fisher dr.s.m.fisher at gmail.com
Wed Nov 4 11:34:58 CST 2009


Just a note to remind people that the dictionary syntax in python is
just a convenience - you need to implement __setitem__, __getitem__,
__delitem__ etc. Our __setitem__   can reject requests to set fields
whoch don't already exist for those cases where the set of attributes
is not extensible. It just needs a private method called by the
implementation to set the attributes with any defalt values and
indicate whether or not it is extensible. I think it is best to try it
and see if there are any practical problems. Also see:
http://docs.python.org/library/userdict.html#module-UserDict which may
be useful.

Steve


More information about the saga-rg mailing list