GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `PyUnicode_DecodeCharmap`: `mapping` argument not fully documented · Issue #156098 · python/cpython

PyUnicode_DecodeCharmap: mapping argument not fully documented #156098

New issue
Copy link
New issue
Copy link
Open
#156147
Open
PyUnicode_DecodeCharmap: mapping argument not fully documented#156098
#156147
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc direasytopic-C-API

Description

@srittau
srittau
opened on Aug 20, 2026
Issue body actions

Documentation

PyUnicode_DecodeCharmap has a mapping argument that either takes a mapping or a str:

cpython/Objects/unicodeobject.c

Lines 8826 to 8833 in e8158d1

if (PyUnicode_CheckExact(mapping)) {
if (charmap_decode_string(s, size, mapping, errors, &writer) < 0)
goto onError;
}
else {
if (charmap_decode_mapping(s, size, mapping, errors, &writer) < 0)
goto onError;
}

That it takes a str is not documented: https://docs.python.org/3/c-api/unicode.html#character-map-codecs

Linked PRs

  • gh-156098: Document the str form of PyUnicode_DecodeCharmap()'s mapping argument #156147

Activity

  1. srittau
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Aug 20, 2026
  2. github-project-automation
    added this to docs issueson Aug 20, 2026
  3. github-project-automation
    moved this to Todo in docs issueson Aug 20, 2026
  4. StanFromIreland
    added
    easy
    topic-C-API
    on Aug 20, 2026
  5. Diogoec2006 commented on Oct 19, 2026

    @Diogoec2006
    Diogoec2006
    on Oct 19, 2026
    More actions

    Hi everyone! I would like to work on this issue.

    My plan to resolve it is to [explica aquí brevemente tu solución en inglés, por ejemplo: update the C implementation in module X / fix the documentation typo in Y / add a test case for this specific edge case].

    Does this approach sound good to the core team? If so, I'll go ahead and open a PR.

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirDocumentation in the Doc direasytopic-C-API

    Projects

    • docs issues
      Status
      Todo
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.