title: Python, subclassing immutable types
body: <p>I've the following class:</p>
  
  <pre><code>class MySet(set):
  
      def __init__(self, arg=None):
          if isinstance(arg, basestring):
              arg = arg.split()
          set.__init__(self, arg)
  </code></pre>
  
  <p>This works as expected (initialising the set with the words of the string rather than the letters).  However when I want to do the same with the immutable version of set, the <code>__init__</code> method seems to be ignored:</p>
  
  <pre><code>class MySet(frozenset):
  
      def __init__(self, arg=None):
          if isinstance(arg, basestring):
              arg = arg.split()
          frozenset.__init__(self, arg)
  </code></pre>
  
  <p>Can I achieve something similar with <code>__new__</code> ?</p>