Skip to main content

Implements the null object pattern.

Project description

Implements the null object pattern.

Provides:

  • a Null singleton that can be used like None (but is not None and is not equal to None)

  • a NullList that returns Null instead of raising IndexError

  • a NullDict that returns Null instead of raising KeyError

  • a nullify() routine that converts mappings and sequences to the nullified variant

  • an unset singleton for clearing up APIs to distinguish between a keyword argument that is set by the user as None and simply not set by the user

How do I run the tests?

The easiest way would be to extract the source tarball and run:

$ python test/test_null.py

Change Log

0.6.1

  • MANIFEST.in will forever be my favourite gotcha of Python packaging

  • PEP8-fied the sources

0.6.0

  • long overdue Python 3 support

0.5.0

  • initial published version

Authors

Glued together by Łukasz Langa.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

null-0.6.1.tar.gz (25.6 kB view details)

Uploaded Source

File details

Details for the file null-0.6.1.tar.gz.

File metadata

  • Download URL: null-0.6.1.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for null-0.6.1.tar.gz
Algorithm Hash digest
SHA256 77debb2c7a6c47d4d44a129f507f01267d1df4844b432fbf05491d7f6bb6aeee
MD5 4ec5b58d11e652cb1c4dc03ce108d4c3
BLAKE2b-256 3289c66c77683529b45c8732433a576bccafeb2399180977d42717da398dbf4d

See more details on using hashes here.

Supported by

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