Skip to main content Brad's PyNotes

Posts on Python3

  1. PEP 3105: Make print a Function

    TL;DR

    PEP 3105 converted Python’s print statement into a built-in function in Python 3.0. This change provided consistency with the rest of Python’s syntax and allowed features like custom separators, file output redirection, and easy replacement with logging systems.

  2. PEP 3134: Exception Chaining and Embedded Tracebacks

    TL;DR

    PEP 3134 introduced exception chaining in Python 3, allowing exceptions to preserve their context when new exceptions occur during error handling. The raise ... from syntax creates explicit chains, while Python automatically captures implicit chains, both appearing in tracebacks to simplify debugging.