[Python-Dev] threading.Semaphore()'s counter can become negative for non-ints (original) (raw)
Victor Stinner victor.stinner at haypocalc.com
Mon Jan 30 00:46:32 CET 2012
- Previous message: [Python-Dev] threading.Semaphore()'s counter can become negative for non-ints
- Next message: [Python-Dev] threading.Semaphore()'s counter can become negative for non-ints
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
import threading s = threading.Semaphore(0.5) But why would you want to pass a float? It seems like API abuse to me.
If something should be changed, Semaphore(arg) should raise a TypeError if arg is not an integer.
Victor
- Previous message: [Python-Dev] threading.Semaphore()'s counter can become negative for non-ints
- Next message: [Python-Dev] threading.Semaphore()'s counter can become negative for non-ints
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]