title: retrieving class variables after inheritance
body: <p>So i'm making a hangman game in tkinter and I'm trying to make the buttons disappear when pressed and reappear when the restart button is pressed. I'm still learning to code and have tried to adjust it to include classes to make the code clearer. This is the code I've used to create the button widgets:</p>
  
  <pre><code>class Buttons:
  
      def __init__(self, letter, column, row):
          self.letter = letter
          self.column = column
          self.row = row
  
      def create(self):
          column = self.column
          row = self.row
          letter = self.letter
          self = tk.Button(window, text=self.letter, bg = colour, font=FONT,
                           command=lambda : check(letter))
          self.place(relx=column, rely=row)
  </code></pre>
  
  <p>And then I place the buttons like this and it all works fine:</p>
  
  <pre><code>A = Buttons('A', column1, row1).create()
  </code></pre>
  
  <p>What I want to do however is access the 'self.letter', 'self.row', and 'self.column' outside of the class definition, however it says that the object is a Nonetype when I try to use 'A.letter' and it has no attribute letter. 
  Traceback (most recent call last):</p>
  
  <pre><code>  File "C:\Users\cameron\Documents\Python\Hangman\Hangman v2.1.py", line       227, in &lt;module&gt;
      print(A.letter)
  AttributeError: 'NoneType' object has no attribute 'letter'
  </code></pre>
  
  <p>Does anyone know how I could access this? </p>
  
  <p>Thank you</p>