Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Oct 26, 2022

It is defined on a module-level and should be documented as such:

>>> import array
>>> array.typecodes
'bBuhHiIlLqQfd'
>>> 

Typeshed definition: https://github.com/python/typeshed/blob/fd75bc21fca7d62235bdd2063ce65cdddbd40a1a/stdlib/array.pyi#L16

@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Oct 26, 2022
Copy link
Contributor

@nanjekyejoannah nanjekyejoannah left a comment

Choose a reason for hiding this comment

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

I have a nit comment below.

(strictly speaking, by the C implementation). The actual size can be accessed
through the :attr:`itemsize` attribute.

The module defines the following items:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the plural "items" here, yet it is just one? And yet the type is correctly singularized. I think we can be consistent, the singular wording looks more appropriate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, good catch! 👍

@nanjekyejoannah nanjekyejoannah merged commit c144e57 into python:main Oct 28, 2022
@nanjekyejoannah
Copy link
Contributor

Thanks for your contribution @sobolevn

gvanrossum pushed a commit to gvanrossum/cpython that referenced this pull request Oct 28, 2022
…ython#98729)

* pythongh-98657: [docs] `array.typecodes` is a module-level attribute

* Update array.rst
@CAM-Gerlach CAM-Gerlach added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Feb 1, 2023
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @nanjekyejoannah for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @nanjekyejoannah for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 1, 2023
…ythonGH-98729)

* pythongh-98657: [docs] `array.typecodes` is a module-level attribute

* Update array.rst
(cherry picked from commit c144e57)

Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 1, 2023
…ythonGH-98729)

* pythongh-98657: [docs] `array.typecodes` is a module-level attribute

* Update array.rst
(cherry picked from commit c144e57)

Co-authored-by: Nikita Sobolev <[email protected]>
@bedevere-bot
Copy link

GH-101484 is a backport of this pull request to the 3.10 branch.

@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Feb 1, 2023

As it fixes a docs defect, applies to all supported versions, avoids future reports like #100925 against the stable docs, and blocks other PRs (namely #101485 ) from being cleanly backported, I marked it for backport as well per standard docs team policy. Could @nanjekyejoannah or another core dev help me merge them, please?

For completeness, they are (since Bedevere didn't link one):

@bedevere-bot
Copy link

GH-101483 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Feb 1, 2023
miss-islington added a commit that referenced this pull request Feb 1, 2023
)

* gh-98657: [docs] `array.typecodes` is a module-level attribute

* Update array.rst
(cherry picked from commit c144e57)

Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington added a commit that referenced this pull request Feb 1, 2023
)

* gh-98657: [docs] `array.typecodes` is a module-level attribute

* Update array.rst
(cherry picked from commit c144e57)

Co-authored-by: Nikita Sobolev <[email protected]>
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

None yet

Development

Successfully merging this pull request may close these issues.

5 participants