Skip to main content

A dictionary that always finds what it's looking for.

Project description

Are you tired of those pesky KeyError exceptions popping up in your programs? Do you need certain keys planted in your dictionaries? Do you just want to get away with it all?

Inspired by Manitowoc County Sheriff’s Lieutenant James Lenk, Lenk is a dictionary-like class that plants values for any key you want to look for. It comes with one key planted by default.

Installation

pip install lenk

Usage

You use Lenk just like any other dictionary.

>>> from lenk import Lenk
>>> evidence = Lenk()
>>> evidence["Toyota Rav4"]
True
>>> evidence["something else"]
'k16uxjcu9wglu25v2kl0'

See? It found that Toyota Rav4 key no problem! It also finds any other key you’d want to look for.

About

Manitowoc County Sheriff’s Lieutenant James Lenk is a bad person.

http://i.imgur.com/EHCNSYV.jpg

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for lenk, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size lenk-1.1-py2-none-any.whl (3.4 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size lenk-1.1.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page