Static Variables
Emile van Sebille
emile at fenx.com
Wed Apr 3 08:07:59 EST 2002
More information about the Python-list mailing list
Wed Apr 3 08:07:59 EST 2002
- Previous message (by thread): Static Variables
- Next message (by thread): ctrl-c and os.system problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Andrew Dalke > What I didn't think about was Gerhard's "counter.cnt" mechanism. > (My mind's still stuck in the 1.4 days :) I really like that, and > think I'll use it more often in the future. > Was this a post? If so, I couldn't locate it. Does it do something like: >>> def counter(): ... try: counter.cnt ... except: counter.cnt= 0 ... counter.cnt += 1 ... return counter.cnt ... >>> counter() 1 >>> counter() 2 -- Emile van Sebille emile at fenx.com ---------
- Previous message (by thread): Static Variables
- Next message (by thread): ctrl-c and os.system problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list