undefined: simulates the JavaScript undefined behaviour in Python
Project description
undefined by Ouroboros Coding
undefined: A value to use as a default value to indicate an argument was absolutely not set buy the user of the method. Will not match as true to any other value but itself.
Installation
pip install undefined-oc
Import
import undefined
def print_me(value = undefined):
if value is undefined:
print('Please pass a value to print')
else:
print(value)
>>> print_me('hello, there')
hello, there
>>> print_me(None)
None
>>> print_me([])
[]
>>> print_me()
Please pass a value to print
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
undefined-oc-1.0.0.tar.gz
(2.7 kB
view details)
File details
Details for the file undefined-oc-1.0.0.tar.gz
.
File metadata
- Download URL: undefined-oc-1.0.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.5 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf7bf857eedaf87d65a5edda93dd25523f66e89834fb140f4b911a1a30fcab07 |
|
MD5 | 8a5c58a56132ab8f332d8860d9e23e2a |
|
BLAKE2b-256 | 275ac1649f3048c2688ba3d8f6be41fe8be67eec4fe7fdcb630486ade76af222 |