Kaydet (Commit) b8c94177 authored tarafından Tim Peters's avatar Tim Peters

Variant of Skip's patch 103246 (Remove unneeded string exception compat from Queue).

üst 10bc5932
"""A multi-producer, multi-consumer queue."""
# define this exception to be compatible with Python 1.5's class
# exceptions, but also when -X option is used.
try:
class Empty(Exception):
pass
class Full(Exception):
pass
except TypeError:
# string based exceptions
# exception raised by get(block=0)/get_nowait()
Empty = 'Queue.Empty'
# exception raised by put(block=0)/put_nowait()
Full = 'Queue.Full'
class Empty(Exception):
"Exception raised by Queue.get(block=0)/get_nowait()."
pass
class Full(Exception):
"Exception raised by Queue.put(block=0)/put_nowait()."
pass
class Queue:
def __init__(self, maxsize=0):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment