candango/cartola

Rename fs read and write functions to avoid shadowing python ones

Closed this issue · 0 comments

piraz commented

Instead using the dot pattern (i.e. fs.read, fs.write) let's rename them to s_read and s_write as they are opening the files not in binary mode.

Let's add depreciation notes to fs.read and fs.write because they will shadow read and write functions if they are imported from cartola.fs, which is faster then use fs.read and fs.write.

While those functions are not the best to be used for big files, this will be good for keep consistency as those functions will receive and return strings by default, so s_read and s_write will solve the shadowing and show that you are handling strings.

We'll create a new ticket for the b_read and b_write for the functions to handle bytes, without passing a parameter.