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 — Docstring of array.array misses 'w' type info and mentions wide/narrow builds · Issue #142083 · python/cpython

Docstring of array.array misses 'w' type info and mentions wide/narrow builds #142083

New issue
Copy link
New issue
Copy link
Closed
Closed
Docstring of array.array misses 'w' type info and mentions wide/narrow builds#142083
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@FRex
FRex
opened on Nov 29, 2025
Issue body actions

Documentation

The docstring of array.array at

cpython/Modules/arraymodule.c

Line 2912 in cfcd524

narrow builds this is 2-bytes on wide builds this is 4-bytes.\n\
has a few mistakes:

  1. in description of 'u' type it mentions the narrow/wide build split that is not a thing since 3.3 - https://docs.python.org/3/whatsnew/3.3.html#functionality
  2. it doesn't mention that since 3.3 the 'u' type is deprecated and 'w' should be used.
  3. it doesn't mention that 'u' type since 3.9 corresponds to wchar_t of C compiler used (so usually 2 byte UTF-16 on Windows, 4 byte UTF-32 elsewhere), instead of to narrow/wide Python build.
  4. it doesn't mention the newer 'w' type that is Python's own Py_UCS4 4 byte UTF-32.

The documentation at https://docs.python.org/3/library/array.html doesn't have these issues, only the docstring (that is shown in help(array.array) in the REPL) does. This is a mismatch between documentation and docstring.

Linked PRs

  • gh-142083: Clarify documentation for array('u') typecode #142323
  • gh-142083: Document the 'w' type code in the array.array docstring #158040
  • [3.15] gh-142083: Document the 'w' type code in the array.array docstring (#158040) #158575
  • [3.14] gh-142083: Document the 'w' type code in the array.array docstring (#158040) (#158575) #159257

Activity

  1. FRex
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Nov 29, 2025
  2. github-project-automation
    added this to docs issueson Nov 29, 2025
  3. github-project-automation
    moved this to Todo in docs issueson Nov 29, 2025
  4. serhiy-storchaka
    added this to Struct, memoryview and array issues 🏗️on Jul 13, 2026
  5. github-project-automation
    moved this to Todo in Struct, memoryview and array issues 🏗️on Jul 13, 2026
  6. vstinner
    added a commit that references this issue on Oct 1, 2026

    gh-142083: Document the 'w' type code in the array.array docstring (#…

    ab01d18
  7. vstinner
    closed this as completedon Oct 1, 2026
  8. vstinner
    added 3 commits that reference this issue on Oct 12, 2026

    pythongh-142083: Document the 'w' type code in the array.array docstr…

    d994162

    [3.15] gh-142083: Document the 'w' type code in the array.array docst…

    c5cc92c

    [3.14] gh-142083: Document the 'w' type code in the array.array docst…

    3ce3543
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 dir

    Projects

    • docs issues
      Status
      Todo
      Show more project fields
    • Struct, memoryview and array issues 🏗️
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — 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.