This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients Claudiu.Popa, Joshua.Johnston, ezio.melotti, orsenthil, r.david.murray
Date 2014-02-07.19:56:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391803015.32.0.684719008761.issue18857@psf.upfronthosting.co.za>
In-reply-to
Content
No, the domain of URIs does not have *any* concept of a null value.  It only has the concept of a string being empty or not empty (or the key not existing at all...ie: it doesn't exist in your params dict).

You are trying to map a Python concept (the singleton object None, which is used for a variety of purposes) into a domain that does not have an equivalent concept.

That said, following the requests model of omitting the key if the value is None is something we could consider as a convenience enhancement.  But we would again run into Python's strict backward compatibility policy.  I could imagine some programmer building an internal web service that turns the string 'None' back into a Python None value.  The fact that it would have to be an internal thing would mean we'd never hear about it...until we broke it :)

Whether or not adding this feature would require a new keyword argument to urlencode is a judgment call.  It might be an acceptable change in a feature release.
History
Date User Action Args
2014-02-07 19:56:55r.david.murraysetrecipients: + r.david.murray, orsenthil, ezio.melotti, Claudiu.Popa, Joshua.Johnston
2014-02-07 19:56:55r.david.murraysetmessageid: <1391803015.32.0.684719008761.issue18857@psf.upfronthosting.co.za>
2014-02-07 19:56:55r.david.murraylinkissue18857 messages
2014-02-07 19:56:54r.david.murraycreate