| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
array -- data type sizes based on GNU documentation Signed-off-by: Daniel Lombardi <lombardi.daniel.o@gmail.com>
Sorry, something went wrong.
|
Can check altered docs at: library/array.html#module-array |
Sorry, something went wrong.
Signed-off-by: Daniel Lombardi <lombardi.daniel.o@gmail.com>
|
Isn't it outdated? I am not sure that on most machines that run Python long is 32-bit. |
Sorry, something went wrong.
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.
|
Eh. I do no see any other your comment. I agree that this change is perhaps not very useful. |
Sorry, something went wrong.
| (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.
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.
You should now, apparently it is important to actually post comments 🤦. That also explains why nobody reacted to my comment...
|
Sorry, something went wrong.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
| 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.
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.
|
I have no more opinions on this. Do whatever. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
array -- data type sizes based on GNU documentation: https://www.gnu.org/software/libc/manual/html_node/Range-of-Type.html
📚 Documentation preview 📚: https://cpython-previews--113708.org.readthedocs.build/