← Back to team overview

openstack team mailing list archive

Re: Commas and semicolons

 

Sorry, typed it quickly.

There was a discussion on this on the ML previously. 

It's semi-colons between the values and commas between the keys

foo=a;b;c, bar=d;e;f

and the more-common case of single value would be

foo=a, bar=b

... this keeps it compatible with DEFINE_list() of gflags. 

-S


________________________________________
From: Glen Campbell
Sent: Thursday, April 14, 2011 10:37 AM
To: Sandy Walsh; openstack@xxxxxxxxxxxxxxxxxxx
Subject: Commas and semicolons

On 4/14/11 6:19 AM, "Sandy Walsh" <sandy.walsh@xxxxxxxxxxxxx> wrote:

>
>Capabilities are just multi-value key-value pairs, such as:
>can_host=linux;windows, cpu_type=gpu, magic_sauce=purple,blue,red;
>cpu_min_max=0.01,0.98;

I don't like the use of commas and semicolons, and you just made the error
here that I was worried about. A semicolon has a higher "precedence" than
a comma, if you will, and is used to separate clauses. You used a
semicolon between linux;windows in the above example, then commas between
the other clauses, but forgot on the magic_sauce and cpu_min_max clauses.

IMHO we should use commas to separate the various values, and semicolons
in between the keys.

Thoughts?

>




References