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-143672: convert the struct module to AC by skirpichev · Pull Request #143673 · python/cpython Conversation
|
|
|
||
| See help(struct) for more on format strings. | ||
| Return a new Struct object which writes and reads binary data according | ||
| to the format string. See help(struct) for more on format strings. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
what is the reason for newline -> double space change? I was not aware that this is required.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
In some docstrings "See help(struct) for more on format strings." was separated to a new paragraph. In some - no. Looks as a waste of space, especially in help(struct) output.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| / | ||
| *args: array | ||
|
|
||
| Pack args to the writtable buffer according to the format self. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Pack args to the writtable buffer according to the format self. | |
| Pack args to the writtable buffer according to the struct's format string. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Too long. Beware @permit_long_summary.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| strings."); | ||
| *args: array | ||
|
|
||
| Return a bytes object with args, packed according the format self. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Return a bytes object with args, packed according the format self. | |
| Return a bytes object with args, packed according the struct's format string. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
BTW, I'm not attached to docstrings. IMO, they aren't good and I tried to improve that. But I can just revert that stuff and keep old doctsrings almost literally (summary line is required, though). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Serhiy Storchaka <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I have not noticed this PR and created an alternative PR #143857.
There are some differences between two PRs, and I had reasons for all changes. We can now gradually convert your PR into my PR by applying one change at a time or just take my PR.
See the difference between the PRs: https://github.com/skirpichev/cpython/pull/14/changes .
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Struct.pack_into as s_pack_into | ||
|
|
||
| buffer: Py_buffer | ||
| offset: Py_ssize_t |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There is a subtle behavior difference here (IndexError vs OverflowError). I leave this for other issue.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| buffer: Py_buffer | ||
| offset: Py_ssize_t | ||
| / | ||
| *args: array |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I prever to use more specific name values.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| /*[clinic input] | ||
| Struct.pack_into as s_pack_into | ||
|
|
||
| buffer: Py_buffer |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The buffer must be writeable.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| offset. Note that the offset is a required argument. See\n\ | ||
| help(struct) for more on format strings."); | ||
| /*[clinic input] | ||
| Struct.pack_into as s_pack_into |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No need to rename it.
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.