mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Merge pull request #321 from HomerMcMillan/tuple_comparisons
Fix error messages in tuple/list comparisons
This commit is contained in:
@@ -109,7 +109,7 @@ fn list_gt(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
|
||||
seq_gt(vm, &zelf, &other)?
|
||||
} else {
|
||||
return Err(vm.new_type_error(format!(
|
||||
"Cannot compare {} and {} using '<'",
|
||||
"Cannot compare {} and {} using '>'",
|
||||
zelf.borrow(),
|
||||
other.borrow()
|
||||
)));
|
||||
@@ -131,7 +131,7 @@ fn list_ge(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
|
||||
seq_ge(vm, &zelf, &other)?
|
||||
} else {
|
||||
return Err(vm.new_type_error(format!(
|
||||
"Cannot compare {} and {} using '<'",
|
||||
"Cannot compare {} and {} using '>='",
|
||||
zelf.borrow(),
|
||||
other.borrow()
|
||||
)));
|
||||
@@ -153,7 +153,7 @@ fn list_le(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
|
||||
seq_le(vm, &zelf, &other)?
|
||||
} else {
|
||||
return Err(vm.new_type_error(format!(
|
||||
"Cannot compare {} and {} using '<'",
|
||||
"Cannot compare {} and {} using '<='",
|
||||
zelf.borrow(),
|
||||
other.borrow()
|
||||
)));
|
||||
|
||||
@@ -47,7 +47,7 @@ fn tuple_gt(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
|
||||
seq_gt(vm, &zelf, &other)?
|
||||
} else {
|
||||
return Err(vm.new_type_error(format!(
|
||||
"Cannot compare {} and {} using '<'",
|
||||
"Cannot compare {} and {} using '>'",
|
||||
zelf.borrow(),
|
||||
other.borrow()
|
||||
)));
|
||||
@@ -69,7 +69,7 @@ fn tuple_ge(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
|
||||
seq_ge(vm, &zelf, &other)?
|
||||
} else {
|
||||
return Err(vm.new_type_error(format!(
|
||||
"Cannot compare {} and {} using '<'",
|
||||
"Cannot compare {} and {} using '>='",
|
||||
zelf.borrow(),
|
||||
other.borrow()
|
||||
)));
|
||||
@@ -91,7 +91,7 @@ fn tuple_le(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
|
||||
seq_le(vm, &zelf, &other)?
|
||||
} else {
|
||||
return Err(vm.new_type_error(format!(
|
||||
"Cannot compare {} and {} using '<'",
|
||||
"Cannot compare {} and {} using '<='",
|
||||
zelf.borrow(),
|
||||
other.borrow()
|
||||
)));
|
||||
|
||||
Reference in New Issue
Block a user