When I run list[()], I modify it so that list[()] comes out
@@ -99,6 +99,14 @@ impl PyGenericAlias {
}
}
+ if self.args.len() == 0 {
+ Ok(format!(
+ "{}[{}]",
+ repr_item(self.origin.as_object().to_owned(), vm)?,
+ "()"
+ ))
+ }
+ else {
Ok(format!(
"{}[{}]",
repr_item(self.origin.as_object().to_owned(), vm)?,
@@ -110,6 +118,7 @@ impl PyGenericAlias {
.join(", ")
))
}
+ }
#[pyproperty(magic)]
fn parameters(&self) -> PyObjectRef {
