title: Kivy/Python: missing 1 required positional argument
body: <p>I am not too terribly familiar with classes/class methods and how they work, and I know my code is atrocious! I wanted to dip my toe into the world of UI, and so I wanted to take a simple function I wrote in Python to see if I could create an app out of it. (Edit: The script produces a &quot;:(&quot; if today is not Monday, and a &quot;:)&quot; if today IS Monday.) (Double edit: this is my first post, I apologize for my ignorance re: coding and also Stack Overflow formatting.) We've got:</p>
  <pre><code>#!/usr/bin/env python                                                                                                          
  from kivy.app import App
  from kivy.uix.label import Label
  import datetime
  from datetime import date
  import calendar
  
  
  today = date.today().strftime('%Y-%d-%m')
  def findDay(self, today):
      day = datetime.datetime.strptime(today, '%Y-%d-%m').weekday()
      y = (calendar.day_name[day])
      if y == 'Monday':
          x = ':)'
          return x
      else:
          x = ':('
          return x
      print(x)
  
  
  
  class MyApp(App):
      def build(self):
          today = date.today().strftime('%Y-%d-%m')
          z = findDay(today)
          return Label(z)
  
  if __name__ == &quot;__main__&quot;:
      MyApp().run()
  </code></pre>
  <p>With the error:</p>
  <pre><code>Traceback (most recent call last):
     File &quot;main.py&quot;, line 30, in &lt;module&gt;
       MyApp().run()
     File &quot;/Users/myusernamehere/opt/anaconda3/lib/python3.7/site-packages/kivy/app.py&quot;, line 829, in run
       root = self.build()
     File &quot;main.py&quot;, line 26, in build
       z = findDay(today)
   TypeError: findDay() missing 1 required positional argument: 'today'
  </code></pre>
  <p>I know this error arises from incorrect instantiation of an object of a class... but based on how I have defined &quot;today&quot;, I am unsure what this means in my given context! (Unless it has to do with &quot;self&quot;?)</p>