urlencoding dictionaries

Marc Tardif intmktg at Gloria.CAM.ORG
Tue May 30 23:56:20 EDT 2000


>>> params = {'one': 'First param',
...           'two': None
...          }
>>> print urllib.urlencode(params)
one=First+param&two=None

Problem is, isn't "None" suppose to be a null object making it absurd to
output "two=None"? Shouldn't urlencode output "two=" or nothing at all
even? Is this a potential improvement upon the urllib module or is there a
way to circumvent this problem I seem to be having?




More information about the Python-list mailing list