|
From: John <was...@gm...> - 2009-11-11 15:40:56
|
It's actually just a nice part of the python language, setattr(a, > 'foo', 'bar') is the same code as a.foo = bar. When working with > NetCDF, the only time I've needed to use setarr (or getattr) is when > the name of the attribute I want isn't a valid python identifier (like > if an attribute has a - in it, e.g. 'unit-type'). > > Slick! Another great reason for python. Thanks for the rapid response. |