diff --git a/README.md b/README.md index 0c2ed3f..cfa0956 100644 --- a/README.md +++ b/README.md @@ -60,9 +60,9 @@ sorted_by_second = sorted(, key=lambda el: el[1]) sorted_by_both = sorted(, key=lambda el: (el[1], el[0])) flatter_list = list(itertools.chain.from_iterable()) ``` -* **For details about sort(), sorted(), min() and max() see [sortable](#sortable).** +* **For details about sort(), sorted(), min() and max() see [Sortable](#sortable).** * **Module [operator](#operator) has function itemgetter() that can replace listed [lambdas](#lambda).** -* **This text uses the term 'collection' instead of 'iterable'. For rationale see [collection](#collection).** +* **This text uses the term collection instead of iterable. For rationale see [Collection](#collection).** ```python = len() # Returns number of items. Also works on dict, set and string. @@ -1420,7 +1420,7 @@ except (, [...]) as : ... * **Also catches subclasses of the exception.** * **Use `'traceback.print_exc()'` to print the full error message to stderr.** * **Use `'print()'` to print just the cause of the exception (its arguments).** -* **Use `'logging.exception()'` to log the passed message, followed by the full error message of the caught exception. For details see [logging](#logging).** +* **Use `'logging.exception()'` to log the passed message, followed by the full error message of the caught exception. For details see [Logging](#logging).** * **Use `'sys.exc_info()'` to get exception type, object, and traceback of caught exception.** ### Raising Exceptions diff --git a/index.html b/index.html index a2f010a..9e97a0a 100644 --- a/index.html +++ b/index.html @@ -123,9 +123,9 @@ sorted_by_both = sorted(<collection>, key=lam flatter_list = list(itertools.chain.from_iterable(<list>))
    -
  • For details about sort(), sorted(), min() and max() see sortable.
  • +
  • For details about sort(), sorted(), min() and max() see Sortable.
  • Module operator has function itemgetter() that can replace listed lambdas.
  • -
  • This text uses the term 'collection' instead of 'iterable'. For rationale see collection.
  • +
  • This text uses the term collection instead of iterable. For rationale see Collection.
<int> = len(<list>)             # Returns number of items. Also works on dict, set and string.
 <int> = <list>.count(<el>)      # Returns number of occurrences. Also `if <el> in <coll>: ...`.
@@ -1207,7 +1207,7 @@ LogicOp = Enum('LogicOp', {'traceback.print_exc()' to print the full error message to stderr.
 
  • Use 'print(<name>)' to print just the cause of the exception (its arguments).
  • -
  • Use 'logging.exception(<str>)' to log the passed message, followed by the full error message of the caught exception. For details see logging.
  • +
  • Use 'logging.exception(<str>)' to log the passed message, followed by the full error message of the caught exception. For details see Logging.
  • Use 'sys.exc_info()' to get exception type, object, and traceback of caught exception.
  • Raising Exceptions

    raise <exception>
    diff --git a/pdf/remove_links.py b/pdf/remove_links.py
    index 65fec85..df31531 100755
    --- a/pdf/remove_links.py
    +++ b/pdf/remove_links.py
    @@ -7,9 +7,9 @@ from pathlib import Path
     
     
     MATCHES = {
    -    'For details about sort(), sorted(), min() and max() see sortable.': 'For details about sort(), sorted(), min() and max() see sortable (p. 16).',
    +    'For details about sort(), sorted(), min() and max() see Sortable.': 'For details about sort(), sorted(), min() and max() see Sortable (p. 16).',
         'Module operator has function itemgetter() that can replace listed lambdas.': 'Module \'operator\' (p. 31) has function itemgetter() that can replace listed lambdas (p. 11).',
    -    'This text uses the term \'collection\' instead of \'iterable\'. For rationale see collection.': 'This text uses the term \'collection\' instead of \'iterable\'. For rationale see collection (p. 18).',
    +    'This text uses the term collection instead of iterable. For rationale see Collection.': 'This text uses the term collection instead of iterable. For rationale see Collection (p. 18).',
         'Adding \'!r\' to the expression converts object to string by calling its repr() method.': 'Adding \'!r\' to the expression converts object to string by calling its repr() method.',
         'It can be any callable, but is usually implemented as a function that returns a closure.': 'It can be any callable, but is usually implemented as a function that returns a closure.',
         'Hints are used by type checkers like mypy, data validation libraries such as Pydantic and lately also by Cython compiler. However, they are not enforced by CPython interpreter.': 'Hints are used by type checkers like mypy, data validation libraries such as Pydantic and lately also by Cython compiler. However, they are not enforced by CPython interpreter.',
    @@ -20,7 +20,7 @@ MATCHES = {
         'Objects returned by the itertools module, such as count, repeat and cycle.': 'Objects returned by the itertools module, such as count, repeat and cycle (p. 3).',
         '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.',
    -    'Use \'logging.exception(<str>)\' to log the passed message, followed by the full error message of the caught exception. For details see logging.': 'Use \'logging.exception(<str>)\' to log the passed message, followed by the full error message of the caught exception. For details see logging (p. 31).',
    +    'Use \'logging.exception(<str>)\' to log the passed message, followed by the full error message of the caught exception. For details see Logging.': 'Use \'logging.exception(<str>)\' to log the passed message, followed by the full error message of the caught exception. For details see Logging (p. 31).',
         '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 spreadsheet to the console use Tabulate library.': 'To print the spreadsheet to the 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).',