Hi Pat, Since I'm bumping my head against that multiple stuff as I type this, I can offer a hearty "the sooner the better" vote on a more intuitive interface. Thanks, Brian On Thu, May 09, 2002 at 02:39:43PM +0900, Patrick May wrote: > One thing that I don't like is the way cgi forces you to treat every > param as if there were multiples, when most of the time you're dealing > with single params. > > I know you can do things like > > multiple, = cgi["multiple"] > > or > > multiple = cgi["multiple"][0] > > but these seem crufty. Here's an idea I had: > > > # query string => "multiple=something&key=value&multiple=somethingelse" > cgi["multiple"] # <= "something" > cgi["multiple"].multiple # <= ["something", "somethingelse"] > > cgi["key"] # <= "value" > cgi["key"].multiple # <= ["value"] > > > This api would handle the most common case in a very intuitive way for > the programmer. It also allows the programmer to explicitly handle > multiple params. > > This is part of my work on a larger reorganization of CGI*. However, > if it seems like a good idea I'd be willing to implement this behavior > in the current library. > > What do you think? Would this be a nicer way of handling cgi params? > Has this issue been handled in other ways? > > ~ Patrick > > * http://www.hexane.org/cgi-bin/hexane.cgi?page=TheNarfFramework -- > very much in gestation, though there is code (not vaporware!) -- | Brian Wisti | brian / coolnamehere.com | http://www.coolnamehere.com/ | "All you need in life is ignorance and confidence, then | success is sure." -- Mark Twain