Skip to content

Commit fa40a13

Browse files
authored
Merge pull request RustPython#3887 from moreal/improve-frozenset-debug-string
Improve frozenset debug representation
2 parents 524ff93 + a809746 commit fa40a13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vm/src/builtins/set.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ impl fmt::Debug for PySet {
133133
impl fmt::Debug for PyFrozenSet {
134134
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
135135
// TODO: implement more detailed, non-recursive Debug formatter
136-
f.write_str("frozenset")
136+
f.write_str("PyFrozenSet ")?;
137+
f.debug_set().entries(self.elements().iter()).finish()
137138
}
138139
}
139140

0 commit comments

Comments
 (0)