[Q] Bug in cgi.FieldStorage?

Dieter Maurer dieter at handshake.de
Fri Sep 3 20:20:37 CEST 2004


"Ames Andreas (MPA/DF)" <Andreas.Ames at tenovis.com> writes on Mon, 23 Aug 2004 19:15:11 +0200:
> ...
> >>if fs:
> ...
> > What question do you intuitively expect that statement to be asking?
> 
> class Request:
>       def __init__(self, fs = None)
>           if fs:
>              self._fs = fs
>           else:
>              self._fs = FieldStorage(...)

This definitely should become:

        ...
        if fs is not None:
                self._fs = fs


Dieter



More information about the Python-list mailing list