Skip to content

gh-155033: Support copy.replace() for csv dialects - #155035

Merged
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:csv-dialect-replace
Aug 13, 2026
Merged

gh-155033: Support copy.replace() for csv dialects#155035
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:csv-dialect-replace

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Add __replace__() to the _csv.Dialect type and to the csv.Dialect base class, so that CSV dialects support copy.replace().

Parameters that are not replaced are inherited from the original dialect, and the result is validated like a newly created dialect.

Add __replace__() to the _csv.Dialect type and to the csv.Dialect base
class.  Formatting parameters that are not replaced are inherited from
the original dialect, and the result is validated like a newly created
dialect.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@read-the-docs-community

read-the-docs-community Bot commented Aug 1, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33869419 | 📁 Comparing 4e1a526 against main (534b6b0)

  🔍 Preview build  

2 files changed
± library/csv.html
± whatsnew/changelog.html

serhiy-storchaka and others added 2 commits August 1, 2026 18:51
The change is too minor for What's New.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka merged commit b4af851 into python:main Aug 13, 2026
54 checks passed
mbeijen pushed a commit to mbeijen/cpython that referenced this pull request Aug 14, 2026
…5035)

Add __replace__() to the _csv.Dialect type and to the csv.Dialect base
class.  Formatting parameters that are not replaced are inherited from
the original dialect, and the result is validated like a newly created
dialect.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant