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.

Source Distribution

lenk-1.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

lenk-1.0-py2-none-any.whl (3.4 kB view details)

Uploaded Python 2

File details

Details for the file lenk-1.0.tar.gz.

File metadata

  • Download URL: lenk-1.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lenk-1.0.tar.gz
Algorithm Hash digest
SHA256 c04d6b03a6efebe4349b57d3256b77e26c2220f4464328ee83e4c53e472461a5
MD5 3c131c9649dd9014e12fbff00f8e7d20
BLAKE2b-256 d41f69e009613ec511805a50292064892723fe63bdef6615e8cf06939cb5ef74

See more details on using hashes here.

Provenance

File details

Details for the file lenk-1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for lenk-1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 9d0cfd60133388401d9e8325b54dbf9256dfe3b3062a60d023a8899f9ffbc635
MD5 93b9a3bf34e2a5c509585ca8e7ab0813
BLAKE2b-256 5c5a16b117d04ea07b7b9ec3d8189793e23614658b8a051858819645dd1789aa

See more details on using hashes here.

Provenance

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