mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
builtins: fix error message incompatibility
This commit fix issue #2939. Add self.code.obj field in error message for remove incompatibility with cpython. Signed-off-by: snowapril <sinjihng@gmail.com>
This commit is contained in:
@@ -187,7 +187,8 @@ impl PyFunction {
|
||||
}
|
||||
if !missing.is_empty() {
|
||||
return Err(vm.new_type_error(format!(
|
||||
"Missing {} required positional arguments: {}",
|
||||
"{}() missing {} required positional arguments: {}",
|
||||
&self.code.obj_name,
|
||||
missing.len(),
|
||||
missing.iter().format(", ")
|
||||
)));
|
||||
|
||||
Reference in New Issue
Block a user