title: Object has no attribute '__getitem__' (class instance?)
body: <p>It might be a very simple question but I am very confused with where I am going right now. Here is a very basic class:</p>
  
  <pre><code>class Book(object):
      def __init__(self, title, price):
          self.book = {'title':title, 'price':price}
  </code></pre>
  
  <p>And when I run this:</p>
  
  <pre><code>book = Book('foo', 300)
  book['price']
  </code></pre>
  
  <p>It spits out:</p>
  
  <pre><code>TypeError: 'Book' object has no attribute '__getitem__'
  </code></pre>
  
  <p>I know that it's not the conventional way of initializing an instance since I am using a dictionary. But I wonder why that code is spitting out a TypeError. How do I go about solving this issue?
  Thank you in advance.</p>
  
  <p>ps. The book instance's type is class?</p>