
I think we have an agreement on E then: E) description.set_attribute ("Executable", "/bin/date"); So, no dict, no properties, but a simple plain SAGA attribute API. Great :-) Thanks, Andre. Quoting [Steve Fisher] (Nov 06 2009):
Date: Fri, 6 Nov 2009 13:37:28 +0000 Subject: Re: [SAGA-RG] SAGA attributes as Python dictionaries? From: Steve Fisher <dr.s.m.fisher@gmail.com> To: Andre Merzky <andre@merzky.net> Cc: Mathijs den Burger <mathijs@cs.vu.nl>, SAGA-RG <saga-rg@ogf.org>, hartmut.kaiser@gmail.com
Though I like D, as it can't work when the extra parameter is needed for tasks, I agree that we should go for E. If someone comes up with a smart way of doing something else we can add it later.
Steve
2009/11/6 Andre Merzky <andre@merzky.net>:
Quoting [Mathijs den Burger] (Nov 06 2009):
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");
+1, for the same reasons as Mathijs.
A.
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
-- Nothing is ever easy. -- saga-rg mailing list saga-rg@ogf.org http://www.ogf.org/mailman/listinfo/saga-rg
-- Nothing is ever easy.