New submission from Floris Bruynooghe <floris.bruynoo...@gmail.com>:
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 just replacing __bool__ to __nonzero__. See also the thread starting here: http://mail.python.org/pipermail/python-ideas/2009-May/004617.html ---------- components: Library (Lib) files: event.diff keywords: patch messages: 87587 nosy: flub severity: normal status: open title: Add __bool__ to threading.Event and multiprocessing.Event type: feature request versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file13959/event.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5998> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com