title: Python list() function on (non) iterable
body: <p>I'm facing an issue with the <code>list()</code> function. I have a simple class</p>
  
  <pre><code>class Foo(object):
     def __init__(self, value):
        self.value = value    
  </code></pre>
  
  <p>And I'm trying to construct a list with the <code>Foo</code> object:</p>
  
  <pre><code>lhs = list(Foo(1))
  ...
  rhs = list(Foo(2))
  
  return lhs + rhs
  </code></pre>
  
  <p>The desired result should be <code>[Foo(1), Foo(2)]</code>. However I need to use such result in the recursive call, so in the following step this result becomes the argument of the <code>list()</code> function of <code>lhs</code> and I want to append such list by another <code>Foo</code> element:</p>
  
  <pre><code>lhs = list([Foo(1), Foo(2)])
  ...
  rhs = list(Foo(3))
  
  return lhs + rhs
  </code></pre>
  
  <p>And the final result should be <code>[Foo(1), Foo(2), Foo(3)]</code>. The issue is that the <code>list(Foo(1))</code> function raises the <code>TypeError</code> because the <code>Foo</code> is not iterable. Is there any way how to fix it?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>A better use case:</p>
  
  <pre><code>def create_foo(value):
     return Foo(value)
  
  def concatenate(lhs, rhs):
     return list(lhs) + list(rhs)
  
  
  concatenate(concatenate(create_foo(1), create_foo(2)), create_foo(3))
  </code></pre>