diff --git a/README.md b/README.md index 7dad4c6..8c5097c 100644 --- a/README.md +++ b/README.md @@ -2048,7 +2048,7 @@ from array import array ``` ```python - = bytes() # Converts array to a bytes object. + = bytes() # Returns a copy of array's memory. .write() # Writes array to the binary file. ``` diff --git a/index.html b/index.html index 3dbf04f..7135550 100644 --- a/index.html +++ b/index.html @@ -1693,7 +1693,7 @@ CompletedProcess(args=['bc', '<typecode>', <array>) # Treats array as a sequence of numbers. <array>.fromfile(<file>, n_items) # Appends items from the binary file. -
<bytes> = bytes(<array>)                       # Converts array to a bytes object.
+
<bytes> = bytes(<array>)                       # Returns a copy of array's memory.
 <file>.write(<array>)                          # Writes array to the binary file.
 

#Memory View

A sequence object that points to the memory of another bytes-like object. Each element can reference a single or multiple consecutive bytes, depending on format. Order and number of elements can be changed with slicing.

<mview> = memoryview(<bytes/bytearray/array>)  # Immutable if bytes, else mutable.