[Q] Bug in cgi.FieldStorage?
Tim Roberts
timr at probo.com
Sun Aug 22 00:56:51 EDT 2004
"Ames Andreas (MPA/DF)" <Andreas.Ames at tenovis.com> wrote:
>
>I'm currently using Zope 2.7.2-0 which in turn uses cgi.FieldStorage
>from Python 2.3.4.
>
>FieldStorage can either build a 'list' or a 'file' to represent a
>request. Unfortunately it overwrites __len__ such that it throws an
>exception when the request wasn't of type 'multipart', i.e. when it
>doesn't 'return' a list but a file. I'd consider this a bug because
>if you have an instance fs of FieldStorage you can't safely write
>
>if fs:
> ...
What question do you intuitively expect that statement to be asking?
I've been using cgi.FieldStorage() for quite a while, and I can't say that
I have ever wanted to write a statement like that.
--
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list
mailing list