[issue5998] Add __bool__ to threading.Event and multiprocessing.Event

2012-01-10 Thread Florian Berger
Florian Berger added the comment: Voting for re-opening. I am currently porting a non-threaded function for use within a threaded application. If threading.Event had __bool__, it would be a drop-in replacement for simple True/False flags that can not be used in multithreaded code. To me, it

[issue5998] Add __bool__ to threading.Event and multiprocessing.Event

2009-05-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: I'm closing because a lack of positive feedback on the list. -- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed ___ Python tracker _

[issue5998] Add __bool__ to threading.Event and multiprocessing.Event

2009-05-11 Thread Floris Bruynooghe
New submission from Floris Bruynooghe : I think it would allow for more pythonic code if the threading.Event and multiprocessing.Event classes had the __bool__ special attribute. This would allow doing "if e: ..." instead of "if e.is_set(): ...". This could be backported to 2.x really easily by