[ python-Bugs-1015249 ] cgi.FieldStorage.__len__ eventually throws TypeError

SourceForge.net noreply at sourceforge.net
Tue Aug 24 15:32:25 CEST 2004


Bugs item #1015249, was opened at 2004-08-24 15:32
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1015249&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Andreas Ames (yxcv)
Assigned to: Nobody/Anonymous (nobody)
Summary: cgi.FieldStorage.__len__ eventually throws TypeError

Initial Comment:
This makes it hazardous to do the following:

fs = cgi.FieldStorage(...)
if fs:
 ...

Suggestions:

1)  Fix __len__; sorry, but I don't know how.

2) Create FieldStorage.__nonzero__; a hack.

3) ?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1015249&group_id=5470


More information about the Python-bugs-list mailing list