diff --git a/README.md b/README.md index 13c8ee5..f7e971e 100644 --- a/README.md +++ b/README.md @@ -1290,7 +1290,7 @@ class MySequence: ### ABC Sequence * **It's a richer interface than the basic sequence.** * **Extending it generates iter(), contains(), reversed(), index() and count().** -* **Unlike `'abc.Iterable'` and `'abc.Collection'`, it is not a duck type. That is why `'issubclass(MySequence, abc.Sequence)'` would return False even if MySequence had all the methods defined. It however recognizes list, tuple, range, str, bytes, bytearray, array, memoryview and deque, because they are registered as its virtual subclasses.** +* **Unlike `'abc.Iterable'` and `'abc.Collection'`, it is not a duck type. That is why `'issubclass(MySequence, abc.Sequence)'` would return False even if MySequence had all the methods defined. It however recognizes list, tuple, range, str, bytes, bytearray, array, memoryview and deque, since they are registered as Sequence's virtual subclasses.** ```python from collections import abc @@ -1410,7 +1410,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.** +* **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 2eaa7d9..f2e5747 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -1104,7 +1104,7 @@ Hello World!

ABC Sequence

  • It's a richer interface than the basic sequence.
  • Extending it generates iter(), contains(), reversed(), index() and count().
  • -
  • Unlike 'abc.Iterable' and 'abc.Collection', it is not a duck type. That is why 'issubclass(MySequence, abc.Sequence)' would return False even if MySequence had all the methods defined. It however recognizes list, tuple, range, str, bytes, bytearray, array, memoryview and deque, because they are registered as its virtual subclasses.
  • +
  • Unlike 'abc.Iterable' and 'abc.Collection', it is not a duck type. That is why 'issubclass(MySequence, abc.Sequence)' would return False even if MySequence had all the methods defined. It however recognizes list, tuple, range, str, bytes, bytearray, array, memoryview and deque, since they are registered as Sequence's virtual subclasses.
from collections import abc
 
 class MyAbcSequence(abc.Sequence):
@@ -1203,7 +1203,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(<message>)' to log the passed message, followed by the full error message of the caught exception.
  • +
  • Use 'logging.exception(<message>)' 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>
    @@ -2932,7 +2932,7 @@ $ deactivate                  # Deactivates the activ
      
     
       
     
    diff --git a/pdf/remove_links.py b/pdf/remove_links.py
    index bb47338..937990e 100755
    --- a/pdf/remove_links.py
    +++ b/pdf/remove_links.py
    @@ -19,6 +19,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(<message>)\' to log the passed message, followed by the full error message of the caught exception. For details see logging.': 'Use \'logging.exception(<message>)\' to log the passed message, followed by the full error message of the caught exception. For details see logging (p. 32).',
         '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).',