/ Published in: Python
Tiny python closure for combining redis keys with "format".
Uses a closure so it does not remake the base key each use.
Uses a closure so it does not remake the base key each use.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
def formatKey(): key = '{}:{}' def fmtK(k1, k2): return key.format(k1, k2) return fmtK