`"...".format(**ctx)` which skips unknown keys?
<p>Is it possible to create a dict-like object that can be used in <code>str.format()</code> and that leaves unknown substitutions, i.e.:</p>

<pre><code>ctx = Context(source='foo', name='bar')
print "{source}/static/{name}-{version}.min.css".format(**ctx)
</code></pre>

<p>should print</p>

<pre><code>"foo/static/bar-{version}.min.css"
</code></pre>

<p>I tried with a simple <code>dict</code> subclass:</p>

<pre><code>class Context(dict):
    def __getitem__(self, k):
        if k not in self: return '{%s}' % k
        return dict.__getitem__(self, k)
</code></pre>

<p>but that errors with <code>KeyError: 'version'</code></p>