Message306749
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. |
|
Date |
User |
Action |
Args |
2017-11-22 19:32:51 | r.david.murray | set | recipients:
+ r.david.murray, paullongnet |
2017-11-22 19:32:51 | r.david.murray | set | messageid: <1511379171.94.0.213398074469.issue32116@psf.upfronthosting.co.za> |
2017-11-22 19:32:51 | r.david.murray | link | issue32116 messages |
2017-11-22 19:32:51 | r.david.murray | create | |
|