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=3, limit=3):
... return lst[offset:offset+limit]
>>> s([1,2,3,4,5,6,7,8,9,10], offset=None, limit=5) # offset=3 is in effect
[4, 5, 6, 7, 8]
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.1.tar.gz
(1.7 kB
view details)
Built Distribution
File details
Details for the file nonelib-0.0.1.tar.gz
.
File metadata
- Download URL: nonelib-0.0.1.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31444593c13fd25acd89831ee8129f43bbe0764fc9977926e4936d258ed6676f |
|
MD5 | c9233dc9b83758f07b776c87b4670081 |
|
BLAKE2b-256 | 9707b2cfe6df32a524b04a35585d089703fd7333b912fcea54a173a8787d0be6 |
Provenance
File details
Details for the file nonelib-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: nonelib-0.0.1-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad788bb6bf69cace0bdc3e1462c91bc8c1e7932b903ffa5407ef1fe582a195fe |
|
MD5 | 6ecb10a8245191baa92a9a26604ce9e2 |
|
BLAKE2b-256 | 1efc4c9166c5c21bf2473dc624b573568214cb5e8baaddaadd71ec3f6c08d408 |