Implements the null object pattern.
Provides:
- a
Nullsingleton that can be used likeNone(but is notNoneand is not equal toNone) - a
NullListthat returnsNullinstead of raisingIndexError - a
NullDictthat returnsNullinstead of raisingKeyError - a
nullify()routine that converts mappings and sequences to the nullified variant - an
unsetsingleton for clearing up APIs to distinguish between a keyword argument that is set by the user asNoneand simply not set by the user
Use Bitbucket to report issues:
https://bitbucket.org/ambv/null
The easiest way would be to extract the source tarball and run:
$ python test/test_null.py
MANIFEST.inwill forever be my favourite gotcha of Python packaging- PEP8-fied the sources
- long overdue Python 3 support
- initial published version
Glued together by Łukasz Langa.