title: Can't set attribute for subclasses of namedtuple
body: <p>It looks like <a href="https://stackoverflow.com/questions/1529002/cant-set-attributes-of-object-class">this</a> or <a href="https://stackoverflow.com/questions/4183432/cant-set-attribute-with-new-style-properties-in-python">this</a> are somewhat related threads, but still haven't figured things out :)</p>
  
  <p>I'm trying to create a subclass of <code>namedtuple</code> and provide different initializers so that I can construct objects in different ways.  For example:</p>
  
  <pre><code>&gt;&gt;&gt; from collections import namedtuple
  &gt;&gt;&gt; class C(namedtuple("C", "x, y")) :
  ...     __slots__ = ()
  ...     def __init__(self, obj) : # Initialize a C instance by copying values from obj
  ...         self.x = obj.a
  ...         self.y = obj.b
  ...     def __init__(self, x, y) : # Initialize a C instance from the parameters
  ...         self.x = x
  ...         self.y = y
  </code></pre>
  
  <p>However, that doesn't work:</p>
  
  <pre><code>&gt;&gt;&gt; c = C(1, 2)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "&lt;stdin&gt;", line 7, in __init__
  AttributeError: can't set attribute
  </code></pre>
  
  <p>After some poking around (for example, see <a href="https://stackoverflow.com/questions/12745671/cannot-init-an-instance-of-a-subclassed-namedtuple">this</a> thread) I tried to use constructors instead of initializers:</p>
  
  <pre><code>&gt;&gt;&gt; from collections import namedtuple
  &gt;&gt;&gt; class C(namedtuple("C", "x, y")) :
  ...     __slots__ = ()
  ...     def __new__(cls, obj) :
  ...       self = super(C, cls).__new__(cls, obj.a, obj.b)
  ...     def __new__(cls, x, y) :
  ...       self = super(C, cls).__new__(cls, x, y)
  </code></pre>
  
  <p>which seemed to construct an object but then I can't read its attributes:</p>
  
  <pre><code>&gt;&gt;&gt; c = C(1,2)
  &gt;&gt;&gt; c.x, c.y
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  AttributeError: 'NoneType' object has no attribute 'x'
  </code></pre>
  
  <p>Where am I going wrong here?  How can I create a subclass with multiple constructors or initializers?</p>