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 hashes)