homepage

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 skrah
Recipients mark.dickinson, skrah
Date 2011年08月12日.11:33:26
SpamBayes Score 0.00015000894
Marked as misclassified No
Message-id <1313148807.6.0.39228067291.issue12740@psf.upfronthosting.co.za>
In-reply-to
Content
It is somewhat complicated to calculate the number of members in
a Struct, so I propose to add Struct.nmemb (in 3.3, 3.2 and 2.7):
>>> import struct
>>> s = struct.Struct("Pxx3Lxxxx3s")
>>> s.size
47
>>> s.nmemb
5
I chose 'nmemb' because it is a standard name in Unix man pages.
Another option would be to spell it out ('nmembers').
History
Date User Action Args
2011年08月12日 11:33:27skrahsetrecipients: + skrah, mark.dickinson
2011年08月12日 11:33:27skrahsetmessageid: <1313148807.6.0.39228067291.issue12740@psf.upfronthosting.co.za>
2011年08月12日 11:33:26skrahlinkissue12740 messages
2011年08月12日 11:33:26skrahcreate

AltStyle によって変換されたページ (->オリジナル) /