FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-131885: Document `/` for `codecs` functions by donbarbos · Pull Request #131992 · python/cpython · GitHub

/ cpython Public

gh-131885: Document / for codecs functions - #131992

Merged
vstinner merged 1 commit into
python:mainfrom
donbarbos:issue-131885-codecs
Apr 14, 2025
Merged

gh-131885: Document / for codecs functions#131992
vstinner merged 1 commit into
python:mainfrom
donbarbos:issue-131885-codecs

Conversation

donbarbos commented Apr 1, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

1. I found that CodecInfo class signature contains an undocumented (non-public) _is_text_encoding argument:

cpython/Lib/codecs.py

Lines 94 to 96 in c2ac662

def __new__(cls, encode, decode, streamreader=None, streamwriter=None,
incrementalencoder=None, incrementaldecoder=None, name=None,
*, _is_text_encoding=None):

Signature, inspect.signature(codecs.CodecInfo):

<Signature (encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None, *, _is_text_encoding=None)>

I don't think this should be documented, but I thought I'd point it out just in case.


2. I'm not a fan of using / and I also want to point out that it doesn't seem natural for codecs functions to use positional-only arguments, since they are only used in the functions that I updated. I would suggest getting rid of / in the code instead of documenting it.


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

bedevere-app Bot added awaiting review docs Documentation in the Doc dir skip news labels Apr 1, 2025
github-project-automation Bot moved this to Todo in Docs PRs Apr 1, 2025
donbarbos changed the title Document / for codecs functions gh-131885: Document / for codecs functions Apr 1, 2025

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

python-cla-bot Bot commented Apr 6, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

vstinner merged commit bd47ec9 into python:main Apr 14, 2025
github-project-automation Bot moved this from Todo to Done in Docs PRs Apr 14, 2025

Copy link
Copy Markdown
Member

Merged, thank you.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL