static effect on python
        Posted  
        
            by 
                fatai
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by fatai
        
        
        
        Published on 2011-01-05T16:24:07Z
        Indexed on 
            2011/01/05
            16:53 UTC
        
        
        Read the original article
        Hit count: 226
        
how we can construct static effect on python instead of using class and global ?
not like that one :
global a
a = []
#simple ex ;
fonk ( a , b , d) 
   x =  1 
   a.append ( x) 
EDIT: I want to create temporary memory , if I exit the function namely fonk , I want to save change as list on temporary memory . We can do that demand only put static keyword in front of data type but in python , we dont have static, so I want that effect in python . Therefore , how can I do ?
As above code say "a" represents temporary memory
© Stack Overflow or respective owner