GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-110383: Added explanation in Doc about array data types range. Based on GNU docs by LombardiDaniel · Pull Request #113708 · python/cpython Conversation
|
|
Can check altered docs at: library/array.html#module-array |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Daniel Lombardi <[email protected]>
|
Isn't it outdated? I am not sure that on most machines that run Python |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yes. See also my comment above. The proposed text is not correct in several ways:
Other than that I don't understand why adding these notes is helpful for users, these notes don't add anything that I (as a user) can use. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Eh. I do no see any other your comment. I agree that this change is perhaps not very useful. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| (2) | ||
| Int data types (signed or unsigned) can be 16 or 32 bits depending on the platform. The | ||
| same way that long data types can be 32 or 64 bits depending on the platform. On most | ||
| machines that run GNU C Library, an int is a 32-bit quantity. On most machines, long | ||
| int is also 32-bit, the same size as int. And lastly, on most machines, long long int | ||
| are 64-bit quantities. View more at: https://www.gnu.org/software/libc/manual/html_node/Range-of-Type.html | ||
|
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
IMHO "on most machines ..." doesn't really add anything.
In practice most general purpose machines are one of:
There are exceptions to this, but AFAIK most of those are special CPUs like DSPs or are from before the existence of C. Neither of which are useful to mention here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
You should now, apparently it is important to actually post comments 🤦. That also explains why nobody reacted to my comment...
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Terry Jan Reedy <[email protected]>
| Please migrate to ``'w'`` typecode. | ||
|
|
||
| (2) | ||
| As of 2024, 'h', 'i', 'l', and 'q' are usually 2, 4, 4 on Windows else 8, and 8 bytes. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This note talks about h, so if it's kept, the \(2) should be added to the h & H lines in the table.
But, maybe this PR should be closed without merging. If you're wrinting cross-platform code you shouldn't rely on “common” values; if not you can use itemsize to find values that are actually right for your platform.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have no more opinions on this. Do whatever. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.