Skip to content

Clarify blob handling. #56

Open
Open
@Julian-O

Description

In Python, the only semantic difference between bytes and bytearray data structures, is that the former are immutable and the latter are mutable. It is similar to the difference between tuples and lists.

However, in oscpy, bytes are treated as as an OSC-String and bytesarrays are treated as an OSC-Blob. They are treated differently as to whether they go through an encoding/decoding stage,

This distinction is not obvious nor intuitive.

Please consider treating bytes as OSC-Blobs, to make then consistent. Unicode strings should continue to be treated as strings and encoded/decoded.

Failing that please consider documenting this in the Gotcha section.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions