Skip to content

Floats are silently rounded to integers #9

Description

@Qqwy

Bencdr.decode Bencodr.bencode(3.1415) == 3

This conversion happens silently, which makes it a bit dangerous, because people will not know that it happens, and with some data this will create issues.
It would be great if not having float support could be added to the documentation. Also, maybe throwing an error instead of silently rounding is better behaviour in cases like this.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions