Variant of Skip's patch 103246 (Remove unneeded string exception compat from Queue).
This commit is contained in:
parent
10bc59320c
commit
b8c941771a
20
Lib/Queue.py
20
Lib/Queue.py
|
@ -1,18 +1,12 @@
|
||||||
"""A multi-producer, multi-consumer queue."""
|
"""A multi-producer, multi-consumer queue."""
|
||||||
|
|
||||||
# define this exception to be compatible with Python 1.5's class
|
class Empty(Exception):
|
||||||
# exceptions, but also when -X option is used.
|
"Exception raised by Queue.get(block=0)/get_nowait()."
|
||||||
try:
|
pass
|
||||||
class Empty(Exception):
|
|
||||||
pass
|
class Full(Exception):
|
||||||
class Full(Exception):
|
"Exception raised by Queue.put(block=0)/put_nowait()."
|
||||||
pass
|
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 Queue:
|
class Queue:
|
||||||
def __init__(self, maxsize=0):
|
def __init__(self, maxsize=0):
|
||||||
|
|
Loading…
Reference in New Issue