Message141951
| 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:27 | skrah | set | recipients:
+ skrah, mark.dickinson |
| 2011年08月12日 11:33:27 | skrah | set | messageid: <1313148807.6.0.39228067291.issue12740@psf.upfronthosting.co.za> |
| 2011年08月12日 11:33:26 | skrah | link | issue12740 messages |
| 2011年08月12日 11:33:26 | skrah | create |
|