Skip to content

ctypes _pack_ & _align_ documentation needs elaboration #136520

Open
@bordenc

Description

@bordenc

Documentation

The documentation on the _pack_ and _align_ variables for the Structure and Union classes needs elaboration. Currently, both say something to the effect of "An optional small integer that allows overriding the alignment of the structure..."

The documentation is clear that setting either parameter to 0 has no effect. However, it is unclear what effect setting the value to anything other than 0 has. Is it a true/false value? Does it set the number of bits to which each field should be aligned and/or padded and/or truncated? Does it override the third tuple parameter when setting fields? What happens if it's set to a negative number?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions