R. David Murray <[email protected]> added the comment:
Um. If they aren't expected to understand how to write this code, why isn't it
being provided to them as a canned function as part of the test environment?
To succeed in getting something like this added, I suspect you will need to
show that it has more general utility, or there is something analogous that can
be added that has more general utility. I recommend starting a discussion on
the python-ideas mailing list.
By the way, if I needed this in my code, I'd write:
with open(file_name, newline="") as csvfile:
my_list = list(csv.reader(csvfile))
with open(file_name, 'w', newline="") as csvfile:
csv.writer(csvfile).writerows(my_list)
Only if I needed it more than once would I bother wrapping it in a function.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32116>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com