python-attrs
attrs
BlogDocs

Provide option in attrs.define to allow users to exclude parameters set to default value from `repr`

#1276
Comparing
RNKuhns:repr_optionally_exclude_param_defaults
(
9f1963b
) with
main
(
f5683b8
)
-28%
Improvements
0
Regressions
3
Untouched
5
New
0
Dropped
0
Ignored
0

Benchmarks

Failed

test_create_frozen_classRegression
bench/test_benchmarks.py::test_create_frozen_class
-25%
1.7 s
2.3 s
test_create_simple_classRegression
bench/test_benchmarks.py::test_create_simple_class
-28%
1.5 s
2.1 s
test_create_simple_class_make_classRegression
bench/test_benchmarks.py::test_create_simple_class_make_class
-28%
1.5 s
2 s

Passed

test_instantiate_no_defaults
bench/test_benchmarks.py::test_instantiate_no_defaults
0%
1.3 ms
1.3 ms
test_instantiate_with_defaults
bench/test_benchmarks.py::test_instantiate_with_defaults
0%
1.3 ms
1.3 ms
test_hash
bench/test_benchmarks.py::test_hash
0%
1.2 ms
1.2 ms
test_eq_equal
bench/test_benchmarks.py::test_eq_equal
0%
872.4 µs
873 µs
test_eq_unequal
bench/test_benchmarks.py::test_eq_unequal
0%
672.5 µs
673.2 µs

Commits

Click on a commit to change the comparison range
Base
main
f5683b8
-34%
Merge branch 'main' into repr_optionally_exclude_param_defaults
149d7a3
4 months ago
by hynek
+6%
Merge branch 'main' into repr_optionally_exclude_param_defaults
c8fdfd0
4 months ago
by hynek
0%
Merge branch 'main' into repr_optionally_exclude_param_defaults
5df2c90
4 months ago
by hynek
0%
Merge branch 'main' into repr_optionally_exclude_param_defaults
01dd4f5
4 months ago
by hynek
0%
Merge branch 'main' into repr_optionally_exclude_param_defaults
9f1963b
4 months ago
by hynek
Home Terms PrivacyDocs