Mercurial > hg > Feedworm
view Preference.py @ 81:050748b596a8
add another idea that has been going round in my head for some time
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Thu, 19 Aug 2010 16:06:18 +0200 |
parents | be990ac6e478 |
children |
line wrap: on
line source
class Preference(object): @staticmethod def forKey(key, session): return session.query(Preference).filter(Preference.key == key).first() def __init__(self, key, value): self.key = key self.value = value def __repr__(self): return "<Preference %s = %s>" % (self.key, self.value)