title: Python - How to bind Button on_press on Kivy with multiple parameters
body: <p>I read <a href="https://stackoverflow.com/questions/12339167/kivy-editing-label-when-button-clicked">this</a> and <a href="https://stackoverflow.com/questions/15497629/kivy-template-with-dynamic-grid-layout">that</a> tags.
  I have the error with function callback, the label has NoneType.</p>
  
  <pre><code>class Root(FloatLayout):
  
      def callback( self, label, instance, *args ):
          ## Try to pass Button.text to the label,
          ## but type(label) is a NoneType
          label.text = instance.text # here
          print(label, type(label))
  
  
      def load_content(self):
          content = self.content
  
          for but in range(65, 67):
              content.add_widget(Button( text=chr(but),
                  on_press = partial(self.callback, self.lbl),
                  font_size=20 ))
  
      content = ObjectProperty(None)
      lbl = ObjectProperty(None)
  </code></pre>