[issue8469] struct - please make sizes explicit

2010-06-17 Thread Mark Dickinson
Changes by Mark Dickinson : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue8469] struct - please make sizes explicit

2010-06-15 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the additional suggestions and patch. I've implemented most of them in revisions r81992 through r81995. I've left the note about 'native size and alignment': native alignment *is* determined using sizeof, and I think this is important information

[issue8469] struct - please make sizes explicit

2010-06-12 Thread Mads Kiilerich
Mads Kiilerich added the comment: Thanks for improving the documentation! A couple of comments for possible further improvements: I think it would be helpful to also see an early notice about how to achieve platform independence, versus the default of the local platform. And perhaps the desc

[issue8469] struct - please make sizes explicit

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: Merged to maintenance branches in r81959 (release26-maint) and r81960 (release31-maint). Closing. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.1, Python 3.2

[issue8469] struct - please make sizes explicit

2010-06-12 Thread Mark Dickinson
Mark Dickinson added the comment: I've added sizes to the table, reordered some of the sections, and made a couple of other tweaks (like renaming the 'Objects' section to 'Classes') in r81957 (trunk) and r81955-81956 (py3k). I'll backport these changes to release26-maint and release31-maint;

[issue8469] struct - please make sizes explicit

2010-05-29 Thread Mark Dickinson
Changes by Mark Dickinson : -- priority: -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue8469] struct - please make sizes explicit

2010-05-29 Thread Éric Araujo
Changes by Éric Araujo : -- components: +Documentation -Library (Lib) priority: normal -> ___ Python tracker ___ ___ Python-bugs-list

[issue8469] struct - please make sizes explicit

2010-04-21 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the doc suggestions. Actually, the current docs were revised recently; this issue is a helpful reminder to me that those doc revisions need to be backported. :) If you want to see the current docs, look at: http://docs.python.org/dev/library/str

[issue8469] struct - please make sizes explicit

2010-04-21 Thread Mads Kiilerich
Mads Kiilerich added the comment: The more times I read the documentation and your comments I can see that the implementation is OK and the documentation is "complete" and can be read correctly. Please take this as constructive feedback to improving the documentation to make it easier to unde

[issue8469] struct - please make sizes explicit

2010-04-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Apr 20, 2010 at 10:30 AM, Mark Dickinson wrote: .. > It would be possible to add the 'standard' sizes to that table (i.e. the > sizes that you get when using '<', '>', etc.);  would that be helpful? The documentation already includes standard si

[issue8469] struct - please make sizes explicit

2010-04-20 Thread Mark Dickinson
Mark Dickinson added the comment: As Alexander says, *all* the sizes except those for bytes are platform-dependent: there are platforms where sizeof(short) isn't 2, for example, or where sizeof(int) isn't 4. It would be possible to add the 'standard' sizes to that table (i.e. the sizes that

[issue8469] struct - please make sizes explicit

2010-04-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It is very easy to generate the size table programmatically: >>> for c in "xcbB?hHiIlLqQfdspP": ... print(c, struct.calcsize(c)) ... x 1 c 1 b 1 B 1 ? 1 h 2 H 2 i 4 I 4 l 8 L 8 q 8 Q 8 f 4 d 8 s 1 p 1 P 8 However, all values above except trivial 1-b

[issue8469] struct - please make sizes explicit

2010-04-20 Thread Mads Kiilerich
New submission from Mads Kiilerich : The struct module is often used (at least by me) to implement protocols and binary formats. That makes the exact sizes (number of bits/bytes) of the different types very important. Please add the sizes to for example the table on http://docs.python.org/li