From 3a5113656ca6eae376c94c05405654c21575c126 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Mon, 8 Jan 2007 20:01:11 +0000 Subject: [PATCH] - python < 2.4 does not support function decorators --- PLC/Table.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PLC/Table.py b/PLC/Table.py index 1229007..60682ed 100644 --- a/PLC/Table.py +++ b/PLC/Table.py @@ -64,7 +64,6 @@ class Row(dict): raise PLCInvalidArgument, "%s: date must be in the future"%human return human - @classmethod def add_object(self, classobj, join_table, columns = None): """ Returns a function that can be used to associate this object @@ -103,8 +102,9 @@ class Row(dict): self.api.db.commit() return add - - @classmethod + + add_object = classmethod(add_object) + def remove_object(self, classobj, join_table): """ Returns a function that can be used to disassociate this @@ -138,6 +138,8 @@ class Row(dict): return remove + remove_object = classmethod(remove_object) + def db_fields(self, obj = None): """ Return only those fields that can be set or updated directly -- 2.43.0