f(x=None) ≡ f()
Project description
Nonelib
Remove None's from data and calls.
nonedict()
>>> from nonelib import nonedict
>>> nonedict(a=1, b=None, c=3)
{'a': 1, 'c':3}
>>> nonedict({'a': 1, 'b': None, 'c':3})
{'a': 1, 'c':3}
@nonewrap
>>> from nonelib import nonewrap
>>> @nonewrap
>>> def s(lst, offset=0, limit=10):
... return lst[offset:offset+limit]
>>> s([1,2,3,4,5,6,7,8,9,10], offset=None, limit=3)
[1, 2, 3]
nonelist()
>>> from nonelib import nonelist
>>> nonelist([1, None, 3])
[1, 3]
noneset()
>>> from nonelib import noneset
>>> noneset({1, None, 3})
{1, 3}
noneiter()
>>> from nonelib import noneiter
>>> for x in noneiter({1, None, 3}):
... print(x)
1
3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nonelib-0.0.tar.gz
(1.8 kB
view hashes)
Built Distribution
nonelib-0.0-py3-none-any.whl
(1.9 kB
view hashes)