Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-98657: [docs] array.typecodes is a module-level attribute #98729

Merged
merged 2 commits into from Oct 28, 2022

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
Member

@nanjekyejoannah nanjekyejoannah left a comment

I have a nit comment below.

@@ -62,6 +62,14 @@ The actual representation of values is determined by the machine architecture
(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
Member

@nanjekyejoannah nanjekyejoannah Oct 28, 2022

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

@sobolevn sobolevn Oct 28, 2022

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
14 checks passed
@nanjekyejoannah
Copy link
Member

nanjekyejoannah commented Oct 28, 2022

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
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.

None yet

3 participants