MCPcopy Index your code
hub / github.com/RustPython/RustPython / resize

Method resize

Lib/test/test_bytes.py:1768–1769  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

1766 b = bytearray(range(10))
1767 v = memoryview(b)
1768 def resize(n):
1769 b[1:-1] = range(n + 1, 2*n - 1)
1770 resize(10)
1771 orig = b[:]
1772 self.assertRaises(BufferError, resize, 11)

Calls

no outgoing calls

Tested by

no test coverage detected