jacebrowning / jacebrowning/comparable
Consider creating an Equality class.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
An `Equality` class would behave similar to the `Similarity` class, but be boolean:
```
>>> eq = Equality(1.00)
>>> print(eq)
100.0% equal
>>> bool(eq)
True
>>> eq = Equality(0.42)
>>> print(eq)
42.0% equal
>>> bool(eq)
False
>>> eq = Equality(0.00)
>>> print(eq)
00.0% equal
>>> bool(eq)
False
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the existing Similarity class and inspecting its representation and boolean-conversion behavior. Implement the proposed Equality behavior so the shown percentage formatting and True/False results are covered, then add or update tests for the 1.00, 0.42, and 0.00 cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100