title: Why Python iterable objects work the way they do?
body: <p>I read about the built in iteration methods of objects from the Python documentation:</p>
  
  <p><a href="https://docs.python.org/2/library/stdtypes.html#iterator-types" rel="nofollow">https://docs.python.org/2/library/stdtypes.html#iterator-types</a></p>
  
  <p>What it says about <code>__iter__</code> method is as follows: </p>
  
  <blockquote>
    <p>Return an iterator object. The object is required to support the
    iterator protocol described below.</p>
  </blockquote>
  
  <p>However, in my opinion this seems not to be the case, if I make <code>__iter__</code> method return a string like <code>'abc'</code> I get a type error: <code>TypeError: iter() returned non-iterator of type 'str'</code> but as we know, strings are iterable objects, how is it possible that python treats it like it is not an iteration object?</p>
  
  <p>I can work around this problem like this:</p>
  
  <pre><code>def __iter__(self):
      return 'abc'.__iter__()
  </code></pre>
  
  <p>but I don't understand why I have to do it this way instead of just returning the <code>'abc'</code> object.</p>
  
  <p>I also noticed that the Python Documentation is not very helpful for beginners, it sure as hell is not making this learning progress easy. With what logic one could come to the conclusion that <code>return 'abc'.__iter__()</code> is the way to go by reading the documentation?</p>
  
  <p>If you have any suggestions on where I could learn more about built in methods and the like in depth, I would be more than happy if you would share. </p>