Skip to content

Commit fc3de33

Browse files
committed
PEP 830: Editorial pass on round-2 additions
Break up two adjacent "rather than" pairs (Rationale and sys.monitoring paragraphs) and reorder/consolidate the Change History bullets so spec changes lead, followed by Rationale, a single Rejected Ideas bullet, a single Open Issues bullet, and housekeeping.
1 parent 95f27b0 commit fc3de33

1 file changed

Lines changed: 18 additions & 24 deletions

File tree

peps/pep-0830.rst

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ The timestamp is recorded when the exception object is created rather than
232232
when it is raised. In the overwhelmingly common ``raise SomeError(...)``
233233
form these are the same moment. Where they differ, instantiation time is
234234
generally the more useful value: a bare ``raise`` or ``raise exc`` re-raise
235-
preserves the time the error first occurred rather than when it was last
235+
preserves the time the error first occurred, not when it was last
236236
re-thrown, and code that constructs exceptions, accumulates them, and later
237237
wraps them in an ``ExceptionGroup`` gets the time each error was detected.
238238

@@ -420,7 +420,7 @@ preserves the original timestamp on re-raise.
420420
This is expected to cost more than the struct-field approach. ``RAISE``
421421
fires once per Python frame during unwind rather than once per exception, so
422422
the callback runs more often than the task requires, and each invocation is
423-
dispatched through vectorcall rather than called directly. Without a struct
423+
dispatched through vectorcall, not called directly. Without a struct
424424
field, storing the value allocates the exception's instance ``__dict__``
425425
plus a ``PyLongObject`` for the timestamp, or for ``add_note()`` the dict
426426
plus a ``__notes__`` list and formatted string. One of the limited
@@ -602,32 +602,26 @@ Change History
602602

603603
- 18-Apr-2026
604604

605-
- Clarified that ``__timestamp_ns__`` is UTC, that clock-read failure
606-
yields ``0``, and how free-list and singleton ``MemoryError`` instances
607-
are timestamped.
608-
- Clarified that ``str(exc)`` and ``repr(exc)`` are unchanged, and that
609-
the ``iso`` display format has microsecond resolution.
610605
- Changed the ``ns`` display format from an integer with an ``ns`` suffix
611606
to seconds with nine decimal digits, allowing direct use with
612607
``datetime.fromtimestamp()``. Dropped the ``us`` format; ``ns`` is now
613-
the default format when the feature is enabled via ``1`` or with no
614-
explicit format value.
615-
- Added Rejected Ideas entries for returning ``None`` when unset and for
616-
using a coarse-resolution clock.
617-
- Replaced the ``traceback`` formatting parameter ``no_timestamp`` with a
608+
the default when enabled via ``1`` or with no explicit format value.
609+
- Replaced the ``traceback`` module ``no_timestamp`` parameter with a
618610
tri-state ``timestamps`` (default ``None``, follow the global setting).
619-
- Noted in Control Flow Exceptions that ``hasattr``, three-argument
620-
``getattr``, and the dict miss paths do not instantiate exceptions in
621-
CPython's hot paths and need no special handling.
622-
- Added a Rationale subsection on instantiation time vs. raise time, and
623-
an Open Issues entry deferring "time of first raise".
624-
- Added Rejected Ideas entries for ``sys.excepthook`` and
625-
``sys.monitoring``, with an Open Issues entry on benchmarking the
626-
latter.
627-
- Reworded the Runtime API rejection.
628-
- Added a Rejected Ideas entry for placing the timestamp in the
629-
``Traceback`` header line, and an Open Issues section noting display
630-
location is open to revision.
611+
- Clarified that ``__timestamp_ns__`` is UTC, that clock-read failure
612+
yields ``0``, and how free-list and singleton ``MemoryError`` instances
613+
are timestamped; that ``str(exc)`` and ``repr(exc)`` are unchanged; and
614+
that the ``iso`` display format has microsecond resolution.
615+
- Noted that ``hasattr``, three-argument ``getattr``, and the dict miss
616+
paths do not instantiate exceptions in CPython's hot paths and need no
617+
special handling.
618+
- Added a Rationale subsection on instantiation time vs. raise time.
619+
- Added Rejected Ideas entries for ``sys.excepthook``, ``sys.monitoring``,
620+
placing the timestamp in the ``Traceback`` header line, returning
621+
``None`` when unset, separate ms/us display formats, and using a
622+
coarse-resolution clock; reworded the Runtime API rejection.
623+
- Added an Open Issues section covering display location, benchmarking the
624+
``sys.monitoring`` alternative, and recording time of first raise.
631625
- Made the Motivation example self-contained.
632626

633627

0 commit comments

Comments
 (0)