title: Error in writing a class
body: <p>I am running through a tutorial online at <a href="http://www.sthurlow.com/python/lesson08/" rel="nofollow noreferrer">http://www.sthurlow.com/python/lesson08/</a> and I believe I understand how classes work in python, at least to some degree but when I run this code:</p>
  
  <pre><code>class Shape:
      def __init__(self,x,y):
          self.x = x
          self.y = y
      description = "This shape has not been described yet"
      author = "Nobody has claimed to make this shape yet"
      def area(self):
          return self.x * self.y
      def perimeter(self):
          return 2 * self.x + 2 * self.y
      def describe(self,text):
          self.description = text
      def authorName(self,text):
          self.author = text
      def scaleSize(self,scale):
          self.x = self.x * scale
      self.y = self.y * scale
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "Y:/python/Shape.py", line 1, in -toplevel-
      class Shape:
    File "Y:/python/Shape.py", line 17, in Shape
      self.y = self.y * scale
  NameError: name 'self' is not defined
  </code></pre>
  
  <p>Any Help would be great</p>
  
  <p>Thanks</p>
  
  <p>Richard</p>