Return to Snippet

Revision: 66728
at June 25, 2014 09:30 by dsonbill


Initial Code
def formatKey():
    key = '{}:{}'
    def fmtK(k1, k2):
        return key.format(k1, k2)
    return fmtK

Initial URL


Initial Description
Tiny python closure for combining redis keys with "format".
Uses a closure so it does not remake the base key each use.

Initial Title
Python formatKey for Redis

Initial Tags
python

Initial Language
Python