Python icon indicating copy to clipboard operation
Python copied to clipboard

Bugs

Open smitrajurkar opened this issue 3 months ago • 7 comments

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.

smitrajurkar avatar Oct 15 '25 05:10 smitrajurkar