diff --git a/README.md b/README.md index fe07974..6dd94a5 100644 --- a/README.md +++ b/README.md @@ -1542,9 +1542,9 @@ args = p.parse_args() # Exits on err value = args. ``` -* **Use `'help='` to set argument description.** +* **Use `'help='` to set argument description that will be displayed in help message.** * **Use `'default='` to set the default value.** -* **Use `'type=FileType()'` for files.** +* **Use `'type=FileType()'` for files. Also accepts 'encoding', but not 'newline'.** Open @@ -1813,8 +1813,9 @@ import csv = next() # Returns next row as a list of strings. = list() # Returns a list of remaining rows. ``` -* **For XML and binary Excel files (xlsx, xlsm and xlsb) use [Pandas](#dataframe-plot-encode-decode) library.** * **File must be opened with a `'newline=""'` argument, or newlines embedded inside quoted fields will not be interpreted correctly!** +* **For XML and binary Excel files (xlsx, xlsm and xlsb) use [Pandas](#dataframe-plot-encode-decode) library.** +* **To print the table to console use [Tabulate](#table) library.** ### Write ```python @@ -1830,7 +1831,7 @@ import csv * **`'quotechar'` - Character for quoting fields that contain special characters.** * **`'doublequote'` - Whether quotechars inside fields are/get doubled or escaped.** * **`'skipinitialspace'` - Whether whitespace after delimiter gets stripped by reader.** -* **`'lineterminator'` - How writer terminates rows. Reader is hardcoded to '\r', '\n', '\r\n'.** +* **`'lineterminator'` - How writer terminates rows. Reader is hardcoded to '\n', '\r', '\r\n'.** * **`'quoting'` - Controls the amount of quoting: 0 - as necessary, 1 - all.** * **`'escapechar'` - Character for escaping quotechars if doublequote is False.** @@ -2980,7 +2981,7 @@ while all(event.type != pg.QUIT for event in pg.event.get()): = .collidepoint((x, y)) # Checks if rectangle contains a point. = .colliderect() # Checks if two rectangles overlap. = .collidelist() # Returns index of first colliding Rect or -1. - = .collidelistall() # Returns indexes of all colliding Rects. + = .collidelistall() # Returns indexes of all colliding rectangles. ``` ### Surface diff --git a/index.html b/index.html index fd8b44c..0e86d99 100644 --- a/index.html +++ b/index.html @@ -1319,9 +1319,9 @@ value = args.<name>
    -
  • Use 'help=<str>' to set argument description.
  • +
  • Use 'help=<str>' to set argument description that will be displayed in help message.
  • Use 'default=<el>' to set the default value.
  • -
  • Use 'type=FileType(<mode>)' for files.
  • +
  • Use 'type=FileType(<mode>)' for files. Also accepts 'encoding', but not 'newline'.

#Open

Opens the file and returns a corresponding file object.

<file> = open(<path>, mode='r', encoding=None, newline=None)
 
@@ -1512,8 +1512,9 @@ CompletedProcess(args=['bc', Pandas library.
  • File must be opened with a 'newline=""' argument, or newlines embedded inside quoted fields will not be interpreted correctly!
  • +
  • For XML and binary Excel files (xlsx, xlsm and xlsb) use Pandas library.
  • +
  • To print the table to console use Tabulate library.
  • Write

    <writer> = csv.writer(<file>)       # Also: `dialect='excel', delimiter=','`.
     <writer>.writerow(<collection>)     # Encodes objects using `str(<el>)`.
    @@ -1529,7 +1530,7 @@ CompletedProcess(args=['bc', 'quotechar' - Character for quoting fields that contain special characters.
     
  • 'doublequote' - Whether quotechars inside fields are/get doubled or escaped.
  • 'skipinitialspace' - Whether whitespace after delimiter gets stripped by reader.
  • -
  • 'lineterminator' - How writer terminates rows. Reader is hardcoded to '\r', '\n', '\r\n'.
  • +
  • 'lineterminator' - How writer terminates rows. Reader is hardcoded to '\n', '\r', '\r\n'.
  • 'quoting' - Controls the amount of quoting: 0 - as necessary, 1 - all.
  • 'escapechar' - Character for escaping quotechars if doublequote is False.
  • Dialects

    ┏━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓
    @@ -2425,7 +2426,7 @@ rect = pg.Rect(240, 2
     
    <bool> = <Rect>.collidepoint((x, y))            # Checks if rectangle contains a point.
     <bool> = <Rect>.colliderect(<Rect>)             # Checks if two rectangles overlap.
     <int>  = <Rect>.collidelist(<list_of_Rect>)     # Returns index of first colliding Rect or -1.
    -<list> = <Rect>.collidelistall(<list_of_Rect>)  # Returns indexes of all colliding Rects.
    +<list> = <Rect>.collidelistall(<list_of_Rect>)  # Returns indexes of all colliding rectangles.
     

    Surface

    Object for representing images.

    <Surf> = pg.display.set_mode((width, height))   # Returns display surface.
     <Surf> = pg.Surface((width, height), flags=0)   # New RGB surface. RGBA if `flags=pg.SRCALPHA`.
    diff --git a/pdf/remove_links.py b/pdf/remove_links.py
    index 6a05afe..49c3e37 100755
    --- a/pdf/remove_links.py
    +++ b/pdf/remove_links.py
    @@ -17,6 +17,7 @@ MATCHES = {
         'Generators returned by the generator functions and generator expressions.': 'Generators returned by the generator functions (p. 4) and generator expressions (p. 11).',
         'File objects returned by the open() function, etc.': 'File objects returned by the open() function (p. 22), etc.',
         'Functions report OS related errors by raising either OSError or one of its subclasses.': 'Functions report OS related errors by raising OSError or one of its subclasses (p. 23).',
    +    'To print the table to console use Tabulate library.': 'To print the table to console use Tabulate library (p. 34).',
         'For XML and binary Excel files (xlsx, xlsm and xlsb) use Pandas library.': 'For XML and binary Excel files (xlsx, xlsm and xlsb) use Pandas library (p. 46).',
         'Bools will be stored and returned as ints and dates as ISO formatted strings.': 'Bools will be stored and returned as ints and dates as ISO formatted strings (p. 9).',
         'An object with the same interface called ProcessPoolExecutor provides true parallelism by running a separate interpreter in each process. All arguments must be pickable.': 'An object with the same interface called ProcessPoolExecutor provides true parallelism by running a separate interpreter in each process. All arguments must be pickable (p. 25).',