Skip to content

Commit 491af24

Browse files
authored
Merge pull request #2446 from verhovsky/format-named-tuples-with-equals
format PyStructSequence with = instead of :
2 parents 51b8f76 + ca9b8ba commit 491af24

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vm/src/pyobject.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ pub trait PyStructSequence: StaticType + PyClassImpl + Sized + 'static {
11291129
fn repr(zelf: PyRef<PyTuple>, vm: &VirtualMachine) -> PyResult<String> {
11301130
let format_field = |(value, name)| {
11311131
let s = vm.to_repr(value)?;
1132-
Ok(format!("{}: {}", name, s))
1132+
Ok(format!("{}={}", name, s))
11331133
};
11341134
let (body, suffix) =
11351135
if let Some(_guard) = rustpython_vm::vm::ReprGuard::enter(vm, zelf.as_object()) {

0 commit comments

Comments
 (0)