Message130275
| Author | terry.reedy |
|---|---|
| Recipients | terry.reedy |
| Date | 2011-03-07.18:29:36 |
| SpamBayes Score | 0.011707578 |
| Marked as misclassified | No |
| Message-id | <1299522578.2.0.51699411527.issue11436@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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' |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2011-03-07 18:29:38 | terry.reedy | set | recipients: + terry.reedy |
| 2011-03-07 18:29:38 | terry.reedy | set | messageid: <1299522578.2.0.51699411527.issue11436@psf.upfronthosting.co.za> |
| 2011-03-07 18:29:36 | terry.reedy | link | issue11436 messages |
| 2011-03-07 18:29:36 | terry.reedy | create | |