Skip to main content

undefined: simulates the JavaScript undefined behaviour in Python

Project description

undefined by Ouroboros Coding

pypi version MIT License

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


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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page