python equivalent of functools 'partial' for a class / constructor
<p>I want to create a class that behaves like collections.defaultdict, without having the usage code specify the factory. EG:
instead of </p>

<pre><code>class Config(collections.defaultdict):
    pass
</code></pre>

<p>this:</p>

<pre><code>Config = functools.partial(collections.defaultdict, list)
</code></pre>

<p>This almost works, but </p>

<pre><code>isinstance(Config(), Config)
</code></pre>

<p>fails. I am betting this clue means there are more devious problems deeper in also. So is there a way to actually achieve this?</p>

<p>I also tried:</p>

<pre><code>class Config(Object):
    __init__ = functools.partial(collections.defaultdict, list)
</code></pre>