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.

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:38terry.reedysetrecipients: + terry.reedy
2011-03-07 18:29:38terry.reedysetmessageid: <1299522578.2.0.51699411527.issue11436@psf.upfronthosting.co.za>
2011-03-07 18:29:36terry.reedylinkissue11436 messages
2011-03-07 18:29:36terry.reedycreate