Skip to content

Commit 83c5a3d

Browse files
committed
improve error message for type_new
1 parent 54152b8 commit 83c5a3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vm/src/obj/objtype.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ pub fn type_new(vm: &VirtualMachine, args: PyFuncArgs) -> PyResult {
248248
let (typ, name, bases, dict) = args.bind(vm)?;
249249
type_new_class(vm, typ, name, bases, dict).map(PyRef::into_object)
250250
} else {
251-
Err(vm.new_type_error(format!(": type_new: {:?}", args)))
251+
Err(vm.new_type_error("type() takes 1 or 3 arguments".to_string()))
252252
}
253253
}
254254

0 commit comments

Comments
 (0)