Skip to main content

Production of falsey objects.

Project description

Package Version PyPI - Status Tests Status Code Coverage Percentage Project License Python Versions

🎭 A very simple Python library package which provides a base class for falsey objects - objects that evaluate to False in boolean contexts.

Installation 📦

pip install falsifier

Examples 💡

The Falsifier class provides a base for creating objects that evaluate to False in boolean contexts:

>>> from falsifier import Falsifier
>>> obj = Falsifier( )
>>> bool( obj )
False

Identity-based equality ensures each instance is only equal to itself:

>>> obj2 = Falsifier( )
>>> obj == obj2
False
>>> obj == obj
True

Use Cases 🎯

  • 🚩 Sentinel Objects: Base class for creating unique sentinel objects that evaluate to False.

  • 🕳️ Absence Indicators: Foundation for creating objects that represent absence or invalidity when None or False may be valid.

More Flair

GitHub last commit Copier Hatch pre-commit Bandit Pylint Pyright Ruff PyPI - Implementation PyPI - Wheel

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page