Skip to content

csv: reader allows escapechar=1 #8284

Description

@hyoinandout

Feature

cpython3.14

Python 3.14.6 (v3.14.6:c63aec69bd5, Jun 10 2026, 08:07:54) [Clang 21.0.0 (clang-2100.1.1.101)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Cmd click to launch VS Code Native REPL
>>> import csv
>>> import io
>>> buf = io.StringIO()
>>> csv.reader(buf,escapechar=1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    csv.reader(buf,escapechar=1)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^
TypeError: "escapechar" must be a unicode character or None, not int

RustPython

>>>>> import io
>>>>> buf = io.StringIO()
>>>>> csv.reader(buf,escapechar=1)
<_csv.reader object at 0x9476eea80>

Python Documentation or reference to CPython source code

https://docs.python.org/3.14/library/csv.html

Metadata

Metadata

Assignees

Labels

C-compatA discrepancy between RustPython and CPythonz-ca-2026Tag to track Contribution Academy 2026

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions