diff --git a/README.md b/README.md index ae047b5..4054d36 100644 --- a/README.md +++ b/README.md @@ -1834,7 +1834,7 @@ import csv .writerows() # Appends multiple rows. ``` * **File must be opened with a `'newline=""'` argument, or '\r' will be added in front of every '\n' on platforms that use '\r\n' line endings!** -* **Open existing file with `'mode="w"'` to overwrite it or `'mode="a"'` to append to it.** +* **Open existing file with `'mode="a"'` to append to it or `'mode="w"'` to overwrite it.** ### Parameters * **`'dialect'` - Master parameter that sets the default values. String or a 'csv.Dialect' object.** @@ -2059,14 +2059,14 @@ Memory View ```python = memoryview() # Immutable if bytes is passed, else mutable. - = [index] # Returns int/float. Bytes if format is 'c'. + = [index] # Returns int or float. Bytes if format is 'c'. = [] # Returns memoryview with rearranged elements. = .cast('') # Only works between B/b/c and other types. .release() # Releases memory buffer of the base object. ``` ```python - = bytes() # Returns a new bytes object. + = bytes() # Returns a new bytes object. Also bytearray(). = .join() # Joins memoryviews using bytes as a separator. = array('', ) # Treats memoryview as a sequence of numbers. .write() # Writes `bytes()` to the binary file. diff --git a/index.html b/index.html index 3328dd4..fd1a4f9 100644 --- a/index.html +++ b/index.html @@ -1524,7 +1524,7 @@ CompletedProcess(args=['bc', 'newline=""' argument, or '\r' will be added in front of every '\n' on platforms that use '\r\n' line endings! -
  • Open existing file with 'mode="w"' to overwrite it or 'mode="a"' to append to it.
  • +
  • Open existing file with 'mode="a"' to append to it or 'mode="w"' to overwrite it.
  • Parameters

    • 'dialect' - Master parameter that sets the default values. String or a 'csv.Dialect' object.
    • @@ -1698,14 +1698,14 @@ CompletedProcess(args=['bc', # Writes array's memory to 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 is passed, else mutable.
      -<obj>   = <mview>[index]                       # Returns int/float. Bytes if format is 'c'.
      +<obj>   = <mview>[index]                       # Returns int or float. Bytes if format is 'c'.
       <mview> = <mview>[<slice>]                     # Returns memoryview with rearranged elements.
       <mview> = <mview>.cast('<typecode>')           # Only works between B/b/c and other types.
       <mview>.release()                              # Releases memory buffer of the base object.
       
      -
      <bytes> = bytes(<mview>)                       # Returns a new bytes object.
      +
      <bytes> = bytes(<mview>)                       # Returns a new bytes object. Also bytearray().
       <bytes> = <bytes>.join(<coll_of_mviews>)       # Joins memoryviews using bytes as a separator.
       <array> = array('<typecode>', <mview>)         # Treats memoryview as a sequence of numbers.
       <file>.write(<mview>)                          # Writes `bytes(<mview>)` to the binary file.