Skip to content

Commit 0e438c5

Browse files
committed
move Rationale below Specification because FLUFL
1 parent 4888429 commit 0e438c5

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

peps/pep-0830.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,6 @@ traces from other services or even logs from the program itself to build a
9696
complete picture.
9797

9898

99-
Rationale
100-
=========
101-
102-
The timestamp is stored as a single ``int64_t`` field in the ``BaseException``
103-
C struct, recording nanoseconds since the Unix epoch. This design was chosen
104-
over using exception notes (:pep:`678`) because a struct field costs nothing
105-
when not populated, avoids creating string and list objects at raise time, and
106-
defers all formatting work to traceback rendering. The feature is entirely
107-
opt-in and does not change exception handling semantics.
108-
109-
11099
Specification
111100
=============
112101

@@ -184,6 +173,17 @@ Third-party projects are **not** expected to support running their tests with
184173
timestamps enabled, and we do not expect many projects would ever want to.
185174

186175

176+
Rationale
177+
=========
178+
179+
The timestamp is stored as a single ``int64_t`` field in the ``BaseException``
180+
C struct, recording nanoseconds since the Unix epoch. This design was chosen
181+
over using exception notes (:pep:`678`) because a struct field costs nothing
182+
when not populated, avoids creating string and list objects at raise time, and
183+
defers all formatting work to traceback rendering. The feature is entirely
184+
opt-in and does not change exception handling semantics or performance.
185+
186+
187187
Backwards Compatibility
188188
=======================
189189

@@ -198,7 +198,8 @@ dictionary. Older Python versions unpickle these correctly via
198198
``__setstate__``. Always emitting the 3-tuple form (with a zero timestamp)
199199
would simplify the logic, but was avoided to keep the pickle output
200200
byte-identical when the feature is off and to avoid any performance impact
201-
on the common case.
201+
on the common case. As much as this author prefers simpler code, it felt
202+
riskier to have exception pickles all increase in size as a default behavior.
202203

203204

204205
Maintenance Burden

0 commit comments

Comments
 (0)