We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3349e24 commit 9f18ccdCopy full SHA for 9f18ccd
vm/src/pyobject.rs
@@ -110,8 +110,18 @@ impl PyObject {
110
match self.kind {
111
PyObjectKind::String { ref value } => value.clone(),
112
PyObjectKind::Integer { ref value } => format!("{:?}", value),
113
- PyObjectKind::List { ref elements } => format!("{:?}", elements),
114
- PyObjectKind::Tuple { ref elements } => format!("{:?}", elements),
+ PyObjectKind::List { ref elements } => {
+ format!("[{}]", elements.iter()
115
+ .map(|elem| elem.borrow_mut().str())
116
+ .collect::<Vec<_>>()
117
+ .join(", "))
118
+ }
119
+ PyObjectKind::Tuple { ref elements } => {
120
+ format!("{{{}}}", elements.iter()
121
122
123
124
125
PyObjectKind::None => String::from("None"),
126
_ => {
127
println!("Not impl {:?}", self);
0 commit comments