Deformed Form

Stephen Hansen me+list/python at ixokai.io
Sat Jun 12 11:46:41 EDT 2010


On 6/12/10 6:19 AM, Victor Subervi wrote:
> You will note those very first lines. This also addresses two other
> responders who believed perhaps I had called the variable from the form in
> question more than once and that it had been "used up/consummed" in the
> first call. Here, the first call is the first line in "Script 2" and it
> prints the value "0", when the value gathered in the very next line from the
> call to "Script 3" is "2", not "0".

Assuming:

  -- You have only one "form" construction reading the FieldStorage in
any module around that's imported or loaded,
  -- That the New_Passengers_Whatever_Other module has no top-level code
which executes as a side-effect that may be changing things
  -- And that between the 'def New_Passengers_Whatever_Other' and the
form, then the call to get the value from the FieldStorage, you are not
doing any other actions which may be messing with stuff, then--

I call bullshit :)

You're doing something that you're not telling us. There's something
else going on. There's no way that form.getfirst() being in another file
will in and of itself (notwithstanding possibilities of the second
invocation actually not working at all due to reading the input) return
different results.

> With respect to Stephens playful jibe about my "absurdly long [variable]
> names", they're long because they're descriptive, and other posters not so
> playfully jibed me about my absurdly short nondescriptive names. Hey, could
> you guys coordinate your jibes so you're all on the same page? ;/

Its a question of balance. Using a lot of extremely small nondescriptive
names is bad. Using a bunch of really long ones is just as bad.

Seek the middle of the road.

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100612/0ecaec7c/attachment-0001.sig>


More information about the Python-list mailing list