Message210488
I'm sorry to reopen this but after it biting me quite a few times more I still cannot think of a valid use-case for this behavior that someone would be depending on 'None' being passed.
I think your backwards compatibility concerns are artificial. Can anyone describe a use-case that depended on arg=None being passed in a query string?
I am sure that anyone who is encountering this behavior is treating the string 'None' as None when encountered in a request query string.
Consider this example usage. A website presents a user with a form to search their twitter followers using the twitter api https://api.twitter.com/1.1/friends/ids.json
Form fields optional
screen_name: [________]
(assume more fields)
Handler gets the form post and builds the dict for the search query string.
# User entered nothing so params = {'screen_name': None, ..more fields}
params = {k: self.request.get(k, None) for k in self.request.GET}
url = "https://api.twitter.com/1.1/friends/ids.json?" + urllib.urlencode(params)
print url
"https://api.twitter.com/1.1/friends/ids.json?screen_name=None"
This would cause the twitter search api to look for your friends with None in their screen name. Not exactly what you'd expect right? |
|
Date |
User |
Action |
Args |
2014-02-07 16:23:26 | Joshua.Johnston | set | recipients:
+ Joshua.Johnston, orsenthil, ezio.melotti, r.david.murray, Claudiu.Popa |
2014-02-07 16:23:26 | Joshua.Johnston | set | messageid: <1391790206.79.0.902899485219.issue18857@psf.upfronthosting.co.za> |
2014-02-07 16:23:26 | Joshua.Johnston | link | issue18857 messages |
2014-02-07 16:23:26 | Joshua.Johnston | create | |
|