Example: Executing ```python # This raises error with open('sample.txt') as f: data = f.read() ``` raises an error saying `error: missing argument 'sz'`. However, when the number of bytes to be read is passed explicitly, it works as expected ```python # This returns first 100 bytes with open('sample.txt') as f: data = f.read(100) ``` **Ideal Behaviour** If nothing is passed, the whole file should be read and returned. **Possible fix** Assumption: `internal/file.seq` handles all `file` operations (`read` in this case) Need to make `sz` and Optional parameter [here](https://github.com/seq-lang/seq/blob/a3b2f3acc83499279f744e1b6fe081dd4a348ec8/stdlib/internal/file.seq#L44]). And if `sz` is `None`, then set `sz` to the file size.
Example:
Executing
raises an error saying
error: missing argument 'sz'. However, when the number of bytes to be read is passed explicitly, it works as expectedIdeal Behaviour
If nothing is passed, the whole file should be read and returned.
Possible fix
Assumption:
internal/file.seqhandles allfileoperations (readin this case)Need to make
szand Optional parameter here. And ifszisNone, then setszto the file size.