[SAGA-RG] SAGA attributes as Python dictionaries?
Mathijs den Burger
mathijs at cs.vu.nl
Fri Nov 6 05:16:46 CST 2009
On Thu, 2009-11-05 at 20:12 +0100, Andre Merzky wrote:
> Quoting [Manuel Franceschini] (Nov 05 2009):
> >
> > As said previously, having an additional way of doing the same thing
> > is complicating rather than helping the user. The user will happily
> > use the dict interface, but then notice that that is not possible
> > anymore once he decided to have an asynchronous job. So he has to
> > learn the "new" way anyway. Why not doing it in the first place and
> > preventing later confusion?
>
> Sounds good to me.
+1
> But maybe its time by now to come to a conclusion - I think I am
> reading the same arguments over and over again in the thread ;)
>
> So, there have been different proposals:
>
> A) description.executable = "/bin/date";
> description.set_attribute ("Executable", "/bin/date");
>
> B) description[executable] = "/bin/date";
> description.set_attribute ("Executable", "/bin/date");
>
> C) description.attributes.executable = "/bin/date";
> description.set_attribute ("Executable", "/bin/date");
>
> D) description.attributes["Executable"] = "/bin/date";
> description.set_attribute ("Executable", "/bin/date");
>
> E) description.set_attribute ("Executable", "/bin/date");
>
> I think C and D did not catch on - just listed for completeness.
> Did I forget a version?
For completeness: how to express async and task versions.
I assume that would look like:
description.set_attribute("Executable", "/bin/date", TaskType.NORMAL)
> So, I'd love to see a show of hands for the different versions -
> maybe we can cut the thread short.
I opt for E: one syntax for all cases is the simplest solution.
best,
Mathijs
More information about the saga-rg
mailing list