From 7446a52c1847d6386b9b3a4fa5f2b4279bd34e01 Mon Sep 17 00:00:00 2001 From: Homer McMillan Date: Tue, 5 Feb 2019 00:27:36 -0500 Subject: [PATCH] Fix error messages in tuple/list comparisons --- vm/src/obj/objlist.rs | 6 +++--- vm/src/obj/objtuple.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vm/src/obj/objlist.rs b/vm/src/obj/objlist.rs index 0df789385..4175b6005 100644 --- a/vm/src/obj/objlist.rs +++ b/vm/src/obj/objlist.rs @@ -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() ))); diff --git a/vm/src/obj/objtuple.rs b/vm/src/obj/objtuple.rs index 233faad20..dc10020f4 100644 --- a/vm/src/obj/objtuple.rs +++ b/vm/src/obj/objtuple.rs @@ -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() )));