asweigart / asweigart/PyFuzzyBool

Request: support truthiness checks

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Currently all of these objects are truthy, so they evaluate to `True` when converted to a boolean.

```pycon
>>> bool(VeryFalse)
True
>>> if not VeryFalse:
... print("Not very false")
... else:
... print("Very false")
...
Very false
```

I think it might make sense for `bool(VeryFalse)` to return `False` and `bool(KindaFalse)` to sometimes return `False` (and sometimes return `True`).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.