title: Detecting %s mixed with named placeholders in python interpolation
body: <p>So apparently, Python will allow</p>
  
  <pre><code>'%s %(var)s' % {'var': 'x'}
  </code></pre>
  
  <p>which produces</p>
  
  <pre><code>"{'var': 'x'} x"
  </code></pre>
  
  <p>I'm writing something where I basically want python's named placeholder substitution features only. Is there any way to detect a mix of named and positional placeholders?</p>
  
  <p><strong>EDIT</strong>: The context of this is that I'm writing something that's sort of a templating tool. After writing a bunch of stuff with %(named)s all over the place, you then call template.substitute(dict) to go and replace everything. I'm trying to prevent the case where people leave <code>%[srfd,etc]</code> in the string(because they forgot to interpolate or something) by throwing an error if it's been left there.</p>