Changeset 331
- Timestamp:
- 12/04/06 22:19:22
- Files:
-
- trunk/storage/db.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/storage/db.py
r330 r331 128 128 129 129 def consume(self, unit, key, value, dbtype): 130 """Set 'value' (of type 'dbtype') as a valid property on the unit.""" 130 131 try: 131 prop = unit.__class__.property(key) 132 # Skip the "property" classmethod to save a function call 133 # (which is ~4x slower). 134 # If someone overrides Unit.property, this will break 135 # their app, but it's called *so* often it seems worth it. 136 ## prop = unit.__class__.property(key) 137 prop = getattr(unit.__class__, key) 138 132 139 pytype = prop.type 133 140 cvalue = self.db.adapterfromdb.coerce(value, dbtype, pytype)
