Skip to content

Bugs #13509

@smitrajurkar

Description

@smitrajurkar

Repository commit

a0b0f41

Python version (python --version)

Python 3.10.7

Dependencies version (pip freeze)

Not applicable (this is a logical issue, not dependency-related)

Expected behavior

All methods (compress, decompress, and coordinate_map) should handle missing or invalid values consistently.

Either:

All methods raise exceptions (e.g., KeyError, ValueError) for invalid inputs, or

All methods return a defined sentinel value (e.g., -1 or None) to indicate failure.

The chosen behavior should be clearly documented and predictable.

There should be no mix of silent failures and exceptions.

Actual behavior

he methods currently behave inconsistently when given invalid or missing inputs:

compress(80) → returns -1 (silent failure)

coordinate_map[80] → raises KeyError (exception)

decompress(5) → returns -1 (silent failure)

This inconsistent mix of return values and exceptions makes debugging difficult and can lead to unexpected runtime behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions