[issue16671] logging.handlers.QueueListener sentinel should not be None

2012-12-13 Thread Vinay Sajip
Vinay Sajip added the comment: > The sentinel starts with a _, which to a casual reader (me) suggests > that it's a private implementation detail that I should not have to > touch. (am I right on this?) Python is a language for consenting adults, so nothing is off-limits, except that you need t

[issue16671] logging.handlers.QueueListener sentinel should not be None

2012-12-13 Thread Andras Szalai
Andras Szalai added the comment: What mislead me is: The current code uses `is` and opposed to `==` which I assume is for the very specific reason to match identity and not value. The sentinel starts with a _, which to a casual reader (me) suggests that it's a private implementation detail th

[issue16671] logging.handlers.QueueListener sentinel should not be None

2012-12-12 Thread Vinay Sajip
Vinay Sajip added the comment: Why do you think None is a valid value to send for normal operation? Since the queue is only meant for sending logging events (records), it seems reasonable to send None as a sentinel - it should never be seen during operation. The QueueListener is *supposed* to

[issue16671] logging.handlers.QueueListener sentinel should not be None

2012-12-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue16671] logging.handlers.QueueListener sentinel should not be None

2012-12-12 Thread Andras Szalai
New submission from Andras Szalai: In the class `logging.handlers.QueueListener` the `_sentinel` is `None`. But >>> a = None >>> b = None >>> a is b True Because of this, the QueueListener stops if it receives a `None`. Were the sentinel a proper instance, like: _sentinel = {} This would not h