title: Python attrs - positional attribute in super class while optional in sub class
body: <p>I have 2 very similiar classes: A and B:</p>
  
  <pre><code>import attr
  @attr.s
  class A(object):
     x = attr.ib()
     y = attr.ib()
  
  @attr.s
  class B(object):
     x = attr.ib()
     z = attr.ib()
     y = attr.ib(default=None)
  </code></pre>
  
  <p>As you can see, they share 2 attributes (x and y), but in class A y attribute is positional while in B it's optional. </p>
  
  <p>I want to group these classes in one super class, but if I try making class B inherit from class A I get the following error:</p>
  
  <pre><code>SyntaxError: duplicate argument 'y' in function definition
  </code></pre>
  
  <p>Added the code I used for raising the error:</p>
  
  <pre><code>@attr.s
  class A(object):
      x = attr.ib()
      y = attr.ib()
  
  
  @attr.s
  class B(A):
      z = attr.ib()
      y = attr.ib(default=None)
  </code></pre>
  
  <p>So my question is: is it possible group these classes in one super class using attrs module? if no, would you suggest me just grouping them like the 'old fashion' way instead (implementing init methods on my own)?</p>
  
  <p>Many thanks!</p>