[issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly
Guido van Rossum
report at bugs.python.org
Fri Sep 27 02:08:23 CEST 2013
Guido van Rossum added the comment:
PS. Simple repro:
import cgi; bool(cgi.FieldStorage('logo', u'tux.png'))
This reveals it's been fixed in Python 3 -- it raises TypeError there as it should. (But __nonzero__ should be deleted, and if someone adds __bool__ they should make sure it raises the same TypeError if self.list is None.)
----------
versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19097>
_______________________________________
More information about the Python-bugs-list
mailing list