← 输入框|bugs.python.org|刷新

➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 terry.reedy
收信人 terry.reedy
日期 2011-03-07.18:29:36
SpamBayes Score 0.011707578
Marked as misclassified 否
Message-id <1299522578.2.0.51699411527.issue11436@psf.upfronthosting.co.za>
In-reply-to
内容
The struct doc does not specify the meaning of 's', without a count. The attached patch adds the sentence:

 If a count is not given, it defaults to 1; ``'s'`` means the same as ``'1s'``.

(Until I experimented, I had thought no count meant indefinite length).

>>> struct.pack('sss', b'', b'a', b'ab')
b'\x00aa'
>>> struct.pack('1s1s1s', b'', b'a', b'ab')
b'\x00aa'
历史
日期 用户 动作 参数
2011-03-07 18:29:38terry.reedy修改recipients: + terry.reedy
2011-03-07 18:29:38terry.reedy修改messageid: <1299522578.2.0.51699411527.issue11436@psf.upfronthosting.co.za>
2011-03-07 18:29:36terry.reedy链接issue11436 messages
2011-03-07 18:29:36terry.reedy创建