-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Description
Documentation
Taking a look at the documentation for array and specifically the methods and module level attributes it defines, we see the following.
The layout — mentioning a module level constant array.typecodes after the array class description and before the methods on the type, would suggest that typecodes is an attribute of the array type, but it is actually an attribute of the array module
If one reads carefully they'll notice the line that states
The following data items and methods are also supported:
But an eye that skims past that text might mistake it for being an attribute of the array type.
Maybe a clear demarcation between the module definitions and the functions defined by the array type would be more helpful.
Taking a look at another standard library datatype collections.Counter, here the class methods are shown right below its description.
The datetime module has a section that defines module level constants and then shows the types.
It would be nice to follow the same pattern for array.
