Suggestions to improve handling of URL flags

Right now, if I pass a URL “argument” with no value (a flag?) to a web service script, the script receives it in a pretty unintuitive form.

For instance, if I call http://deadlinepulse/SomeScript?foo=one&bar=5&spangle, the dict I get in my script looks like this (after the .NET types have been translated):

{'foo': 'one', 'bar': '5', 'unnamedkeyvaluepair0': 'spangle'}

I had a couple of different ideas that I think would improve the handling of these “flag” arguments.

One would be to keep the the value-less arguments in the same argument dict, but store them more like flags, so the args passed from the query above would instead look like this:

{'foo': 'one', 'bar': '5', 'spangle': True} # Or maybe 1

The other idea would be to actually pass the flags to the script in a third argument as a tuple of strings, rather than including them in the dict.

Thoughts on either idea?

I prefer having a key in the dictionary with ‘null’ as the value since that fits my expectations a bit better (since you’re giving a key with no value).

You’d just do the normal if 'spangle' in dict: goodness then.

I’ll bug Ryan about it.

Sure, using a string of ‘null’ makes sense to keep the value types consistent. Thanks.

Cool, it’s on track to be in Dealdine 8.0 for you.

It’ll hopefully be the value of the ‘None’ constant in Python. If it’s not, I’mma be grumpy.