title: python fnmatch.fnmatch("[seq]") escape not working
body: <p>According to the <a href="https://bugs.python.org/issue13929" rel="nofollow noreferrer">https://bugs.python.org/issue13929</a>, &quot;[seq]&quot; should be escaped by the backslash. However, when i run the same code, i have different result like bellow</p>
  <p><a href="https://i.stack.imgur.com/iQxtl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iQxtl.png" alt="enter image description here" /></a></p>
  <p>I need to detect the string contains the &quot;[&quot; and &quot;]&quot;. So, my solution is to change &quot;[seq]&quot; to the &quot;{seq}&quot; on both string and pattern like bellow.</p>
  <pre><code>string = string.replace(&quot;[&quot;, &quot;{&quot;).replace(&quot;]&quot;, &quot;}&quot;)
  pattern = pattern.replace(&quot;[&quot;, &quot;{&quot;).replace(&quot;]&quot;, &quot;}&quot;)
  fnmatch.fnmatch(string, pattern)
  </code></pre>
  <p>Could there be a better solution?</p>