Web programming and a different "type" problem
Ian Bicking
ianb at colorstudy.com
Wed Apr 30 20:30:45 EDT 2003
On Wed, 2003-04-30 at 16:07, Jon Ribbens wrote:
> In article <mailman.1051673506.20716.python-list at python.org>, Ian Bicking wrote:
> > It might be better if the error is signaled earlier and in a more
> > pleasant way, but IMHO throwing away duplicate values when they
> > aren't expected just covers up bugs. But I don't think that's what
> > you're doing in this case (though it sounds like jonpy does this,
> > for instance)...?
>
> You think it would be better to throw an exception if two form
> variables have the same name unexpectedly? I... disagree ;-)
Of course it is better, why not? Unexpected behavior is probably a bug,
exceptions are a proper response to exceptional behavior. So long as
you have a way to indicate whether you expect multiple form values for a
name, you should use that information. Using it to throw away
information seems like the worst option.
Ian
More information about the Python-list
mailing list