◐ Shell
clean mode source ↗

Message 107556 - Python tracker

Module level pack, unpack etc. methods have similar functionality with Struct instance methods, but docs are different.  The immediate issue is the lack of signature in the module level methods' docstrings.


$ ./python.exe -m pydoc struct.Struct.pack
Help on method_descriptor in struct.Struct:

struct.Struct.pack = pack(...)
    S.pack(v1, v2, ...) -> bytes
    
    Return a bytes containing values v1, v2, ... packed according to this
    Struct's format. See struct.__doc__ for more on format strings.

and

$ ./python.exe -m pydoc struct.pack
Help on built-in function pack in struct:

struct.pack = pack(...)
    Return bytes containing values v1, v2, ... packed according to fmt.