title: Python Class variable initialization access variables out side init
body: <p>I'm using Django for our project. And I have created a form using Django forms. In one of the form i need to check a variable and based on the value of the variable i need to add or remove an element.</p>
  
  <p>I'm passing this variable to the form when the object is initialized.
  ie <code>form=MyForm(flag)</code></p>
  
  <p>And in the forms class i'm doing this</p>
  
  <pre><code>class MyInfoForm(forms.Form):
      def __init__(self, *args,**kwargs):
          self.flag= kwargs.pop('flag', None)
          super(MyInfoForm, self).__init__(*args, **kwargs)
          print self.flag
  
      Firstname = forms.CharField(label=u' First name :', max_length=30)
  </code></pre>
  
  <p>In the init function i have printed the flag and its working fine. But how can i access the variable out side <em>init</em>
  I tried </p>
  
  <pre><code>    class MyInfoForm(forms.Form):
          myFlag=None
          def __init__(self, *args,**kwargs):
              self.flag= kwargs.pop('flag', None)
              myFlag=self.flag
              super(MyInfoForm, self).__init__(*args, **kwargs)
              print self.flag
  
          Firstname = forms.CharField(label=u' First name :', max_length=30)
          print myFlag
  </code></pre>
  
  <p>But its not working.</p>