fn read(self, bytes: OptionalOption<i64>, vm: &VirtualMachine) -> PyResult {
        match self.buffer.borrow_mut().read(byte_count(bytes)) {
            Some(value) => Ok(vm.ctx.new_bytes(value)),
            None => Err(vm.new_value_error("Error Retrieving Value".to_string())),
        }
    }
//Takes an integer k (bytes) and returns them from the underlying buffer
//If k is undefined || k == -1, then we read all bytes until the end of the file.
//This also increments the stream position by the value of k
Takes an integer k (bytes) and returns them from the underlying buffer
If k is undefined || k == -1, then we read all bytes until the end of the file.
This also increments the stream position by the value of k
Takes an integer k ( bytes ) and returns them from the underlying buffer If k is undefined || k == - 1 then we read all bytes until the end of the file . This also increments the stream position by the value of k
fn read(self, bytes: OptionalOption<i64>, vm: &VirtualMachine) -> PyResult {
        match self.buffer.borrow_mut().read(byte_count(bytes)) {
            Some(value) => Ok(vm.ctx.new_bytes(value)),
            None => Err(vm.new_value_error("Error Retrieving Value".to_string())),
        }
    }
fn read ( self , bytes : OptionalOption < i64 > , vm : & VirtualMachine ) -> PyResult { match self . buffer . borrow_mut ( ) . read ( byte_count ( bytes ) ) { Some ( value ) => Ok ( vm . ctx . new_bytes ( value ) ) , None => Err ( vm . new_value_error ( " " . to_string ( ) ) ) , } }
Takes an integer k (bytes) and returns them from the underlying buffer
If k is undefined || k == -1, then we read all bytes until the end of the file.
Takes an integer k ( bytes ) and returns them from the underlying buffer If k is undefined || k == - 1 then we read all bytes until the end of the file .
self
bytes
OptionalOption<i64>
vm
&VirtualMachine