From: Douglas S. de A. <ds...@un...> - 2005-06-23 16:24:20
|
Hi Jonathan ! It would not require a patch, but i think that getpost should do what getpo= st1=20 do and vice-versa. It is more common to people that are beginning in spyce to call getpost=20 thinking in doing what getpost1 do. What you think ? And again, congratulations for this tool. See ya ! Em Quinta 23 Junho 2005 15:01, voc=EA escreveu: > On Thu, 23 Jun 2005 11:46:40 +0000, "Douglas Soares de Andrade" > > <ds...@un...> said: > > I was taking a look at the examples and i found a thing: > > > > in a test page, getpost() returns this: > > > > {'txtDados': ['ola'], 'btnEnviar': ['Submeter']} > > > > and getpost1() returns: > > > > {'txtDados': 'ola', 'btnEnviar': 'Submeter'} > > > > Why getpost1() is not the default action (getpost), since it is more > > common to > > work with strings than lists with a string. > > In a pythonic sense, getpost1 _is_ the default, since that's what > __getitem__ performs. (With the difference that if there was neither a > get or post variable, __getitem__ will also return the contents of an > uploaded file, if present.) In other words, you can simply write > request['foo'] instead of request.getpost1('foo'). > > If you'd like to submit a patch to clarify the example you're > referencing, I'd be happy to add it. > > -Jonathan =2D-=20 Douglas Soares de Andrade http://douglasandrade.cjb.net - dsa at unilestemg.br UnilesteMG - www.unilestemg.br ICQ, MSN =3D 76277921, douglas at tuxfamily.org |