All Questions
4 questions
3
votes
1
answer
228
views
Finger Exercise: Update book cipher by creating new book
I'm working my way through the finger exercises in John Guttag's book Introduction to Python Programming, third edition. The following finger exercise on page 143 describes encryption/decryption with ...
2
votes
2
answers
12k
views
Most efficient dict filter on key tuple?
I have a dict wherein a value needs to be retrievable by any one of several keys. It seemed that making multiple dictionaries or multiple entries in a single ...
2
votes
2
answers
3k
views
Validate fields in Python dictionary using dictionary of lambdas
I would love some feedback on this. I use it to validate web-form objects before persisting them in the dangerously-lazy MongoDb. I have a class and many validators for each of my collections. Is ...
18
votes
1
answer
640
views
Python Dictionary Black Magic
I am defining a subclass of a the python dictionary object mpCmd where every item is converted to a lambda. The intended usage is that every item in the dictionary ...