Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Outdated error message when passing an invalid typecode toarray.array constructor #132527

Closed
Labels
3.13bugs and security fixes3.14bugs and security fixeseasyextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error
@tomasr8

Description

@tomasr8

Bug report

Bug description:

This issue is suitable for a first-time contributor.

The'w' typecode issupported but the error message does not mention it:

>>>array('x')Traceback (mostrecentcalllast):File"<python-input-5>",line1,in<module>array('x')~~~~~^^^^^ValueError:badtypecode (mustbeb,B,u,h,H,i,I,l,L,q,Q,ford)

We should add'w' to the list. This is the relevant part of the code that should be updated:

PyErr_SetString(PyExc_ValueError,
"bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)");
returnNULL;

Happy to help if you have any questions!

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixeseasyextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp