python asp page keeps state across queries !?!?

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Wed Aug 24 09:52:26 CEST 2005


nicolas_riesch enlightened us with:
> I notice that variables outside functions keep their value across
> queries.  I don't know if it is normal.

I think it's normal.

> To be sure, I tried a similar asp script written in VB script, and I
> can see that in VBscript, variables at this same level ARE NOT kept
> across different queries !!!

So?

> Someone has an explanation ?

Speed. No need to reload the module for each query. Just don't use any
uninitialized module-scope variables. It's bad style anyway.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list