[Tutor] FieldStorage solution summary

Lance E Sloan lsloan@umich.edu
Wed, 02 May 2001 08:38:28 -0400


Daniel Yoo wrote:
> I'm not sure if dictcat() should have to worry about non-dictionaries; it
> might be better off giving a message that dictcat() needs to take a
> dictonary-like object; otherwise, it might obscure some errors that the
> programmer might forget to check.

I admit the name of the function might be misleading, but its
primary purpose in life is to convert FieldStorage to dictionary.
Do you mean that I should split this into two functions, one for
converting FieldStorage and the other for concatenating dictionaries?
Or do you mean that I should have the function throw an exception
if it is passed an argument that's not a dictionary or FieldStorage?

--
Lance E Sloan
Web Services, Univ. of Michigan: Full-service Web and database design,
development, and hosting.  Specializing in Perl & Python CGIs.
http://websvcs.itd.umich.edu/ - "Putting U on the Web"