Array.array Type Codes are not platforminvariant.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
The platform-specific type codes interpretations for array.array make it more complex to write python code that contains known type codes and data bytes and will run reliably on all platforms. In particular, the 'l' and 'L' codes are 4 bytes on Windows, but 8 bytes on macOS. The 'i' and 'I' codes seem to be 4 in both cases, but that is a convention, not a requirement. There should be 4-byte and 8-byte integer types that guarantee that size regardless of platform---perhaps '4' and '8' for signed, '5' and '9' for unsigned. (I haven't tested other type codes.) The documentation should be updated in the meantime.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the array.array type-code behavior across platforms and reviewing the related documentation. Determine which type-code guarantees are feasible without breaking existing conventions; done means the supported codes have consistent documented sizes and the documentation explains the platform differences or new guarantees.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100