title: What is the difference between .Semaphore() and .BoundedSemaphore()?
body: <p>I know that <code>threading.Lock()</code> is equal to <code>threading.Semaphore(1)</code>.</p>
  <p>Is also <code>threading.Lock()</code> equal to <code>threading.BoundedSemaphore(1)</code> ?</p>
  <p>And newly I saw <code>threading.BoundedSemaphore()</code>, what is the difference between them? For example in the following code snippet (applying limitation on threads):</p>
  <pre><code>import threading
  
  sem = threading.Semaphore(5)
  sem = threading.BoundedSemaphore(5)
  </code></pre>