mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Fix error type in itertools.count constructor
This commit is contained in:
@@ -197,7 +197,7 @@ mod decl {
|
||||
let start = start.into_option().unwrap_or_else(|| vm.new_pyobj(0));
|
||||
let step = step.into_option().unwrap_or_else(|| vm.new_pyobj(1));
|
||||
if !PyNumber::check(&start, vm) || !PyNumber::check(&step, vm) {
|
||||
return Err(vm.new_value_error("a number is require".to_owned()));
|
||||
return Err(vm.new_type_error("a number is required".to_owned()));
|
||||
}
|
||||
|
||||
PyItertoolsCount {
|
||||
|
||||
Reference in New Issue
Block a user