Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@FRex

Description

@FRex
Issue body actions

Documentation

The docstring of array.array at

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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirDocumentation in the Doc dir
    No fields configured for issues without a type.

    Projects

    Status
    Todo
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.