Constructors : Constructor : Class PYTHON TUTORIALS


PYTHON TUTORIALS » Class » Constructor »

 

Constructors


class FooBar: 
    def __init__(self)
        self.somevar = 42 

f = FooBar() 
print f.somevar



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Class
» Constructor