Something like this question:
Distinguish between null and missing parameters in ASP.NET MVC4
…except for WSGI. How can I distinguish between a “no value” query param, and a query param that is not present.
According to this documentation, this code:
value = self.request.get('n')
..returns the empty string when the query parameter is not present.
What will it return if the query param is present but has no value, eq a query string of ?n ?
I am trying to test this, but honestly, I’m having trouble with GAE.
As specified in that doc you linked:
Specify the
default_valueparameter:will return
Noneif the parameternisn’t present (e.g.?foo=bar). If the parameter is present but doesn’t specify a value, you’ll get an empty string (e.g.?n=&foo=bar).