cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-131885: Update csv.rst to describe that `csv.reader` and `csv.wri…

Open adamtheturtle opened this issue 6 months ago • 0 comments

…ter` have some positional-only arguments

import csv

with open("example.csv", "w", newline='') as csvfile:
    csv.writer(csvfile=csvfile)  # TypeError:  expected at least 1 argument, got 0
import csv

csv.reader(csvfile="a")  # TypeError:  expected at least 1 argument, got 0
  • Issue: gh-131885

📚 Documentation preview 📚: https://cpython-previews--136085.org.readthedocs.build/

adamtheturtle avatar Jun 29 '25 04:06 adamtheturtle