MCPcopy Index your code
hub / github.com/RustPython/RustPython / reader

Function reader

crates/stdlib/src/csv.rs:368–387  ·  view source on GitHub ↗
(
        iter: PyIter,
        options: FormatOptions,
        // TODO: handle quote style, etc
        _rest: FuncArgs,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

366
367 #[pyfunction]
368 fn reader(
369 iter: PyIter,
370 options: FormatOptions,
371 // TODO: handle quote style, etc
372 _rest: FuncArgs,
373 vm: &VirtualMachine,
374 ) -> PyResult<Reader> {
375 Ok(Reader {
376 iter,
377 state: PyMutex::new(ReadState {
378 buffer: vec![0; 1024],
379 output_ends: vec![0; 16],
380 reader: options.to_reader(),
381 skipinitialspace: options.get_skipinitialspace(),
382 delimiter: options.get_delimiter(),
383 line_num: 0,
384 }),
385 dialect: options.result(vm)?,
386 })
387 }
388
389 #[pyfunction]
390 fn writer(

Callers 13

__init__Method · 0.85
has_headerMethod · 0.85
test_only_one_bomMethod · 0.85
test_only_one_bomMethod · 0.85
test_stream_bomMethod · 0.85
test_stream_bareMethod · 0.85
test_func_15Method · 0.85
test_readlineMethod · 0.85
test_write_pipeMethod · 0.85
test_write_ptyMethod · 0.85
get_resource_readerFunction · 0.85

Calls 5

newFunction · 0.85
to_readerMethod · 0.80
get_skipinitialspaceMethod · 0.80
get_delimiterMethod · 0.80
resultMethod · 0.45

Tested by 9

test_only_one_bomMethod · 0.68
test_only_one_bomMethod · 0.68
test_stream_bomMethod · 0.68
test_stream_bareMethod · 0.68
test_func_15Method · 0.68
test_readlineMethod · 0.68
test_write_pipeMethod · 0.68
test_write_ptyMethod · 0.68