Merge pull request #3413 from DimitrisJim/remove_old_code

Remove slot_new for longrange_iterator.
This commit is contained in:
Jeong YunWon
2021-11-05 13:28:04 +09:00
committed by GitHub

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());