Remove slot_new for longrange_iterator.

This commit is contained in:
jfh
2021-11-04 18:45:50 +02:00
parent 2309e59a72
commit a8a3cae61f

View File

@@ -515,11 +515,6 @@ impl PyValue for PyLongRangeIterator {
#[pyimpl(with(Constructor, IterNext))]
impl PyLongRangeIterator {
#[pyslot]
fn slot_new(_cls: PyTypeRef, _args: FuncArgs, vm: &VirtualMachine) -> PyResult {
Err(vm.new_type_error("cannot create 'longrange_iterator' instances".to_owned()))
}
#[pymethod(magic)]
fn length_hint(&self) -> BigInt {
let index = BigInt::from(self.index.load());