Is there any way I can use to define member variables with default values other than defining them in __init__ method?
            Asked
            
        
        
            Active
            
        
            Viewed 330 times
        
    -3
            
            
         
    
    
        wim
        
- 338,267
- 99
- 616
- 750
 
    
    
        Vikram Patil
        
- 628
- 6
- 20
- 
                    See https://stackoverflow.com/questions/1537202/variables-inside-and-outside-of-a-class-init-function – saud Dec 10 '17 at 07:42
- 
                    1If you want to do things at compile time, Python is not the language for you. – user2357112 Dec 10 '17 at 07:44
1 Answers
0
            PEP 557 -- Data Classes. (in python 3.7) may be more to your liking https://www.python.org/dev/peps/pep-0557/
 
    
    
        ShpielMeister
        
- 1,417
- 10
- 23