[New-bugs-announce] [issue18857] urlencode of a None value uses the string 'None'

Joshua Johnston report at bugs.python.org
Tue Aug 27 21:54:15 CEST 2013


New submission from Joshua Johnston:

This is strange behavior. When you encode nulls in other languages you don't get the string 'null' you usually get an empy string. Shouldn't str(None) == ''?

If not str(None) == 'None' and the string representation of a None value should not match a known string

>>> from urllib import urlencode
>>> urlencode({'josh': None})
'josh=None'

----------
components: Extension Modules
messages: 196314
nosy: Joshua.Johnston
priority: normal
severity: normal
status: open
title: urlencode of a None value uses the string 'None'
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18857>
_______________________________________


More information about the New-bugs-announce mailing list