title: Why I can't access Kivy lang property from __init__?
body: <p>I'm python beginner.
  I enjoy to get the concept of Kivy and Python.
  I don't understand why following code makes error.</p>
  <p>Python-file</p>
  <pre><code>from kivy.app import App
  from kivy.uix.button import Button
  
  
  class MyButton(Button):
  
      def __init__(self, **kwargs):
          super(MyButton, self).__init__(**kwargs)
          print(f&quot;self.name is{self.name}&quot;) #it makes error.
  
      def print_name(self):
          print(self.name) #But it doesn't make error!!
  
  
  class TestApp(App):
      def __init__(self, **kwargs):
          super(TestApp, self).__init__(**kwargs)
          self.title = 'Test'
  
  
  if __name__ == '__main__':
      TestApp().run()
      
  </code></pre>
  <p>Kivy-file</p>
  <pre><code>#:kivy 1.10.0
  
  &lt;MyButton&gt;:
      name: &quot;MyButton&quot;
      on_press: self.print_name()
  
  MyButton:
      text: self.name
  </code></pre>
  <p>I think name property is already exists because it is created as a class attribute in kivy file, and so the print_name method makes no error.</p>
  <p>Where in the sentence was an error?
  How can I use name property(attribute) made in kivy-file in the <strong>init</strong> method?</p>