MCPcopy Index your code
hub / github.com/python/cpython / Queue

Class Queue

Lib/test/test_codecs.py:60–78  ·  view source on GitHub ↗

queue: write bytes at one end, read bytes from the other end

Source from the content-addressed store, hash-verified

58 return GetCPInfoEx(cp, 0, info)
59
60class Queue(object):
61 """
62 queue: write bytes at one end, read bytes from the other end
63 """
64 def __init__(self, buffer):
65 self._buffer = buffer
66
67 def write(self, chars):
68 self._buffer += chars
69
70 def read(self, size=-1):
71 if size<0:
72 s = self._buffer
73 self._buffer = self._buffer[:0] # make empty
74 return s
75 else:
76 s = self._buffer[:size]
77 self._buffer = self._buffer[size:]
78 return s
79
80
81class MixInCheckStateHandling:

Callers 10

check_partialMethod · 0.70
test_readlinequeueMethod · 0.70
test_copyMethod · 0.70
test_pickleMethod · 0.70
test_copyMethod · 0.70
test_pickleMethod · 0.70
test_copyMethod · 0.70
test_pickleMethod · 0.70
test_basicsMethod · 0.70
test_pickleMethod · 0.70

Calls

no outgoing calls

Tested by 10

check_partialMethod · 0.56
test_readlinequeueMethod · 0.56
test_copyMethod · 0.56
test_pickleMethod · 0.56
test_copyMethod · 0.56
test_pickleMethod · 0.56
test_copyMethod · 0.56
test_pickleMethod · 0.56
test_basicsMethod · 0.56
test_pickleMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…