Last updated:
0 purchases
pythonoptional 1.1.0
Python Optional
Returns None if a dict key does not exist
Install
pip install python_optional
Usage
from python_optional import optional
data = {
'a' : 'b'
}
result = optional(data).get('a') # 'b'
result = optional(data).a # 'b'
result = optional(data).get('z') # None
result = optional(data).z # None
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.