mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
add isatty() method in BytesIO (#7243)
This commit is contained in:
1 parent
a4a9b29687
commit
2833cd8896
1 file changed
+9
@@ -4768,6 +4768,15 @@ mod _io {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[pymethod]
|
||||
fn isatty(&self, vm: &VirtualMachine) -> PyResult<bool> {
|
||||
if self.closed() {
|
||||
return Err(io_closed_error(vm));
|
||||
}
|
||||
|
||||
Ok(false)
|
||||
}
|
||||
}
|
||||
|
||||
#[pyclass]
|
||||
|
||||
Reference in new issue
Block a user